The data is sent to the web server via a comma delimited file, and I then extract the needed data from the resulting array and display the appropriate .jpg file.
Code: Select all
<?php
$filename = "../inside/weather1.txt";
$fd = @fopen ($filename, "r");
$contents = @fread ($fd, "75");
@fclose ($fd);
$delimiter = ",";
$splitcontents = explode($delimiter, $contents);
$rain = $splitcontents[7];
$wind = $splitcontents[8];
$fog = $splitcontents[9];
if ($rain == "rain"){
echo '<p><img src="../images/nogo.bmp" width="60" height="60"></p>';
} else {
echo '<p><img src="../images/go.bmp" width="60" height="60"></p>';
}
if ($wind == "wind"){
echo '<p><img src="../images/nogo.bmp" width="60" height="60"></p>';
} else {
echo '<p><img src="../images/go.bmp" width="60" height="60"></p>';
}
if ($fog == "fog"){
echo '<p><img src="../images/nogo.bmp" width="60" height="60"></p>';
} else {
echo '<p><img src="../images/go.bmp" width="60" height="60"></p>';
}
?>The “go” and “nogo” are small .jpg files, and the whole thing looks like a stop and go light.
This resulting data is then included in a web page in this manner:
<?php include("weatherscript.php") ?>
Here’s the problem.
When I have the file “Pyro Batched” to the Apache web server, on a Debian Linux box, it does not update the stop/go light.
It gets better....
When I directly alter the file and FTP it into the server, it works just fine.
I do not understand why this is happening....open for suggestions, hope someone is willing to help.
Thanks,
Richard