Login

General discussions related to php

Moderators: macek, egami, gesf

Post Reply
User avatar
Nullsig
php-forum Fan User
php-forum Fan User
Posts: 981
Joined: Thu Feb 17, 2011 6:52 am
Location: Racine, WI

Re: Login

Post by Nullsig » Tue Aug 07, 2012 4:03 am

There isn't an 'rb' modifier for fopen. That means more than likely your file isn't even being opened and read.

Your lack of error trapping would be why you have had difficulty finding the error.

You can check this by just changing this line:

Code: Select all

$file = fopen('users.txt', 'rb'); 
To This:

Code: Select all

if($file = fopen('users.txt', 'rb')){

}else{
     echo "Your file failed to open and you should feel bad about that.";
}

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests