Amateur in need of a little help, please.

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
richardk
Forum Newbie
Posts: 4
Joined: Thu Jun 05, 2008 11:07 pm

Amateur in need of a little help, please.

Post 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
User avatar
ghurtado
Forum Contributor
Posts: 334
Joined: Wed Jul 23, 2008 12:19 pm

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

Post by ghurtado »

What is “Pyro Batched”?
Post Reply