Re: php error loadin file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Feb 11, 2008 10:40 AM,  <miren@xxxxxxxxxxxxx> wrote:
> HEllo
> with the next code i am trying for loading one file
>
>
> $mibool = FALSE;
> $Descriptor2 = fopen("usuarios.txt","r");

    Does this file exist in the directory from which the script is
ultimately run, and is it readable?


> $usuarios=array();
> $i=0;
> while(!feof($Descriptor2)){
>     $buffer = fgets($Descriptor2,4086);
>     $usuarios[$i]=$buffer;
>     $i++;
> }
> fclose($Descriptor2);
> $miusername = trim($username);
> foreach($usuarios as  $valor){
>     $mivalor=trim($valor);
>     if(strcasecmp($mivalor,$miusername) == 0){
>         $mibool=TRUE;
>     }else{
>     }
>
> }
> if($mibool == TRUE){
>
> }else{
> header("Location:out.php");
> }
>
>
> but into the log fiel appears this error:
> [Fri Jan 11 22:44:24 2008] [error] [client 192.168.1.2] PHP Warning:
> feof(): supplied argument is not a valid stream resource in miscripts.php
> on line 47, referer: scripts1.php
> [Fri Jan 11 22:44:24 2008] [error] [client 192.168.1.2] PHP Warning:
> fgets(): supplied argument is not a valid stream resource in miscripts.php
> on line 48, referer: scripts1.php
> [Fri Jan 11 22:44:24 2008] [error] [client 192.168.1.2] PHP Warning:
> feof(): supplied argument is not a valid stream resource in miscripts.php
> on line 47, referer: scripts1.php
> [Fri Jan 11 22:44:24 2008] [error] [client 192.168.1.2] PHP Warning:
> fgets(): supplied argument is not a valid stream resource in miscripts.php
> on line 48, referer: scripts1.php
> [Fri Jan 11 22:44:24 2008] [error] [client 192.168.1.2] PHP Warning:
> feof(): supplied argument is not a valid stream resource in miscripts.php
> on line 47, referer: scripts1.php
> [Fri Jan 11 22:44:24 2008] [error] [client 192.168.1.2] PHP Warning:
> fgets(): supplied argument is not a valid stream resource in miscripts.php
> on line 48, referer: scripts1.php
> [Fri Jan 11 22:44:24 2008] [error] [client 192.168.1.2] PHP Warning:
> feof(): supplied argument is not a valid stream resource in miscripts.php
> on line 47, referer: scripts1.php
> [Fri Jan 11 22:44:24 2008] [error] [client 192.168.1.2] PHP Warning:
> fgets(): supplied argument is not a valid stream resource in miscripts.php
> on line 48, referer: scripts1.php
> [Fri Jan 11 22:44:24 2008] [error] [client 192.168.1.2] PHP Warning:
> feof(): supplied argument is not a valid stream resource in miscripts.php
> on line 47, referer: scripts1.php
> [Fri Jan 11 22:44:24 2008] [error] [client 192.168.1.2] PHP Warning:
> fgets(): supplied argument is not a valid stream resource in miscripts.php
> on line 48, referer: scripts1.php
> [Fri Jan 11 22:44:24 2008] [error] [client 192.168.1.2] PHP Warning:
> feof(): supplied argument is not a valid stream resource in miscripts.php
> on line 47, referer: scripts1.php
> [Fri Jan 11 22:44:24 2008] [error] [client 192.168.1.2] PHP Warning:
> fgets(): supplied argument is not a valid stream resource in miscripts.php
> on line 48, referer: scripts1.php
> [Fri Jan 11 22:44:24 2
>
>
> can you help me for solving thsi error?
> thanks
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>



-- 
</Dan>

Daniel P. Brown
Senior Unix Geek
<? while(1) { $me = $mind--; sleep(86400); } ?>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux