Page 1 of 1

Amateur in need of a little help, please.

Posted: Wed Aug 06, 2008 10:00 pm
by richardk
I have a small script meant to alert customers to weather conditions.

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

Re: Amateur in need of a little help, please.

Posted: Thu Aug 07, 2008 3:21 pm
by ghurtado
What is “Pyro Batched”?