Click to See Complete Forum and Search --> : File reading difficulties


Paddy Notemaker
11-18-2004, 06:58 PM
Dear all,

I am trying to make a website that accesses numerous files across a network-the files would of course be voluntarily provided through their username. Basically, the website will have numerous pages that access the work of each person across the network, effectively allowing them to access each other's work, making teamwork easier. The code for one page goes like this(the file that is accessed will change from page to page):

<?php setcookie("uname","name","H") ?>
<html>
<body>
<?php
if($f=fopen("latestexercise.txt","r"))
exit("Unable to open file.");
while (!feof($f))
{
$x=fgetc($f)
echo $x;
}
fclose($f);
?>
</body>
</html>


When i try to view this script on my server, it tells me that there is an error on line 10, but i cannot see what this could be. Does anyone have any ideas?

Thanks.

jebster1ca
11-18-2004, 07:36 PM
Lack of a semi-colon on the end of line 9 is the problem ;)