| 
 Posted by Steve on 10/18/05 16:27 
> My PHP code to read a simple text file is listed below. What could have 
> gone wrong here? When I run it, the browser displays: 'COULD NOT Read' 
> opton of the fread() function. I thought the code was OK. 
 
There are many possible reasons. Please ensure that error reporting is 
turned on. See 
<http://www.php.net/manual/en/function.error-reporting.php>. 
 
ie first statement: error_reporting(E_ALL); 
 
Then you should see a message along the lines of: 
 
   PHP Warning:  fopen(counter.txt): failed to open stream: No such 
file or directory in xxxx on line x 
 
This will show the real reason your fopen() is failing. You might have 
to use View / Source to see the error message embedded in your HTML if 
you have already written tags. 
 
--- 
Steve
 
  
Navigation:
[Reply to this message] 
 |