Hello
we are using :
PHP Version 4.0B2
Zend Engine v0.90
server linux
We trying to run a PHP script which gives the following error
Warning: Unable to find file identifier 0 in main.php on line 6
Warning: Unable to find file identifier 0 in main.php on line 11
But when we print the value of file pointer it is printing 1
The code is as follows :
$userfile="sample.txt";
if(file_exists("$userfile"))
{
if(is_readable("$userfile"))
{
$fp=fopen("$userfile","r") or die("Couldn't open $userfile");
while(!feof($fp))
{
$line=fgets($fp, 1024);
print "$line<br>";
}
fclose($fp);
}
}
Till here
Can any body tell us what is the problem and is there any solution for that?
Thanks
Livetek