Sorry for this newbie question but I hope someone can tell me why I'm getting a parse error on the script. Specifically I'm getting the parse error on the following line:
$myFile = fopen($filename, "r");
Here's My Code:
<?php
$filename ="file.txt";****
$myFile = fopen($filename, "r");
if(! $myFile){************
print ("File could not be opened.");
exit;
}
$fcontents = file($filename);
**$limit = 5;
for ($i = 0; $i < $limit; $i++){
****$line = $fcontents[$i];**
******if($line != ""){**
********echo "$line \n";
**********}
**********
*****}
*****
fclose($myFile);
?>





Bookmarks