On Fri, 2004-07-30 at 13:10, BizHat.com Free Hosting wrote:
>  
> Hi,
>  
> I have following script 
>  
> <?php
>  
> $file_content = file ("./data/reserved.txt","r") or die("Unable to
> open file");
> while(list($line_num,$line) = each ($file_content)) {
> $line = trim($line);
> echo "$line<br>";
> }
>  
> ?>
>  
> 
> at 
> 
> http://free.bizhat.com/test.php
> 
> I get 
> 
> Unable to open file
> 
> error. What should i do ?
> 
> I use PHP 5 on Apache 2, anything with configuration ?
> 
> My phpinfo() available at
> 
> http://free.bizhat.com/phpinfo.php
> 
> Regards,
> 
> Yujin Boby

I was going to suggest removing the "or die" so that you can see the
error message, but you seem to have done this as this is what is now
obtained:

Warning: file() expects parameter 2 to be long, string given in
/var/www/html/test.php on line 10
Unable to open file

The second parameter is number 1 (not string) if you want
use_include_path

Regards

Chris

Reply via email to