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
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php