thank you. I never heard of the existence of "rb" as a parameter for fopen(). All I ever heard of is a, w, r, a+, w+, r+. What other parameters are there that I can use? where can I find more on this?
Also I tried to use the "rb" in the function, but I got the following error:
Warning: file("Resource id #1") - No such file or directory in c:\foxserv\www\try\login.php on line 16
This is the code:
function readlogs() {
// set up the file to read the list of usernames/passwords
$pssfile='/pswd.txt';
$searchfile=fopen($pssfile, "rb");
if ($searchfile) { //this checks if searchfile has opened sucessfully for reading
$logs=file($searchfile); // <-- this is line 16
fclose($searchfile);
}
else {
$logs=false;
print("An error has occured. Please contact the <a href=\"mailto:sablos@hotmail.com\">web master</a> and inform him immediately. Thank you.");
}
return $logs;
}
thanks again