I'm on IIS, windows XP, (local machine) and I cant get it to write to a file either. I checked permissions, I tried all kinds of path description, and fopen just wont write to my file. Is there a setting in the php.ini file I should look at? Nothing was obvious in there. The last code I tried was this:
$header_file = 'c:\\Inetpub\\wwwroot\\projects\\form_sites\\header.txt';
if(!($fp = fopen($header_file, "wb"))) die ("Cannot write to header_file.");
fwrite($fp, $headerb);
fclose($fp);
note : ($headerb is a user input field)
I also looked at the log file for IIS and I get "200" at the end of the log. Don't know what that means.
dont matter what I make the path to "$header_file", nothing works.
I tried:
$header_file = 'c:\\Inetpub\\wwwroot\\projects\\form_sites\\header.txt';
$header_file = './header.txt'; (the file is in same directory as the script)
$header_file = 'header.txt';
$header_file = '
http://myurl/header.txt'; (no error when I do this, but the file stays empty)
one last thing... I copied vangelis code with Wayne's correction that supposed have worked for vangelis, and does not work for me.
any siggestions out there?
thanks