I'm trying to troubleshoot a membership script. The script is
attempting to write to a file called .fdaccess. The function that's
throwing the error is in a file called htpasswd.php. Here's the
fuinction:
function save($file=false){
$fcontents = "";
if($file == false) $file = $this->_path;
foreach(array_keys($this->users) as $user){
$fcontents .= $user.":".$this->users[$user]."\n";
}
if(file_put_contents($file, $fcontents)){
$this->error = '';
return true;
}else{
$this->error = 'Couln\'t save the file!';
return false;
}
}
Here's the error...
Warning: file_put_contents(/public_html/mylogins/extras/.fdaccess)
[function.file-put-contents]: failed to open stream: No such file or
directory in /home/freebnow/public_html/mylogins/admin/htpasswd.php on
line 111
This is line 111: if(file_put_contents($file, $fcontents)){
htpasswd.php is a class available here: http://www.apachelounge.com/forum/viewtopic.php?t=635
The file is in the path specified, and it is chmod 700.
Any suggestions?