I have a webform that needs to read the contents of a txt file that was updated. I created a php script to open the file & read it and I thought - output it to the webform's variable however, it doesn't seem to be working. I thought this would output it to screen at least.
Here is what I did. (I'm on Apache 2 w/ XP OS)
<?php
$filename = "aboutbox.txt";
$myfile= fopen ($filename, "rb");
$contents = fread ($myfile, $filename);
fclose ($myfile);
echo "The contents of this file are: $contents";
?>
I have only been programming PHP for a few weeks and I've picked it up pretty quick but this one is stumping me...
Thanks,
Dave