Page 1 of 1

guestbook in php: writting problems

Posted: Wed Feb 18, 2004 2:35 am
by orangeapple
Hi there,

I did a guestbook in php replacing a marker in the target guestbook.html file with the marker+new entry. It tworks perfectly locally. On the server, I have no message error, and the command fwrite returns the correct number of bytes written, although it leaves the file guestbook.html unchanged (writting actually nothing in it).

This is the part of the code used to write the new entry in the guestbook.html file:

$file = preg_replace($MOTIF, $add, $file);
$fp = fopen("$GUEST_FILE", "wb"); //or error("Can not write \$GUEST_FILE");
flock($fp, 1);
$test=fputs($fp, $file);
//print("$test");
flock($fp, 3);
fclose($fp);

Thanks in advance for the answer.

Posted: Thu Feb 19, 2004 1:06 am
by orangeapple
anyone ??? :?