sabret00the
06-06-2005, 05:58 PM
i'm new at this so please forgive me for asking something dumb
if(file_exists($filename))
{
// set the file to read
$newfile = fopen($filename, "r");
while(!feof($newfile))
{
if(stripos(file_get_contents($filename), $email) !== false)
{
$content = "Our records show that this email address is already registered";
fclose($newfile);
die("$front\n$content\n$back");
}
}
fclose($newfile);
$addemail = fopen($filename, "a");
// let's add the email address
fputs($addemail, "$email\n");
fclose($addemail);
}
had this working fine earlier, now all of a sudden i'm trying to use it and it's stopped have i done something wrong somewhere?
Warning: fopen(../../file.txt): failed to open stream
Warning: fputs(): supplied argument is not a valid stream resource in
Warning: fclose(): supplied argument is not a valid stream resource in
Warning: chmod(): No such file or directory in
it wrote to the file fine at first so what's changed?
is it possible the host disabled the features?
after all the code still works fine on my localhost.
if(file_exists($filename))
{
// set the file to read
$newfile = fopen($filename, "r");
while(!feof($newfile))
{
if(stripos(file_get_contents($filename), $email) !== false)
{
$content = "Our records show that this email address is already registered";
fclose($newfile);
die("$front\n$content\n$back");
}
}
fclose($newfile);
$addemail = fopen($filename, "a");
// let's add the email address
fputs($addemail, "$email\n");
fclose($addemail);
}
had this working fine earlier, now all of a sudden i'm trying to use it and it's stopped have i done something wrong somewhere?
Warning: fopen(../../file.txt): failed to open stream
Warning: fputs(): supplied argument is not a valid stream resource in
Warning: fclose(): supplied argument is not a valid stream resource in
Warning: chmod(): No such file or directory in
it wrote to the file fine at first so what's changed?
is it possible the host disabled the features?
after all the code still works fine on my localhost.