php error loadin file

From: Date: Mon, 11 Feb 2008 15:40:41 +0000
Subject: php error loadin file
Groups: php.general 
Request: Send a blank email to php-general+get-269087@lists.php.net to get a copy of this message
HEllo with the next code i am trying for loading one file $mibool = FALSE; $Descriptor2 = fopen("usuarios.txt","r"); $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

« previous php.general (#269087) next »