[thelist] php: writing to files on IIS

Dunstan Orchard dunstan at 1976design.com
Sat Mar 29 11:58:44 CST 2003


Hi there,

I'm having a few problems writing to an xml file since swapping from Apache to 
IIS.

The code I've been using on Apache is:
**********************************************
$rsspage = 'http://www.foo.com/rss/1.xml'
$rss = all my xml content

if (!file_exists("$rsspage"))
return false;

$fp = @fopen("$rsspage", "w+");

if (!$fp) return false;

fwrite($fp, $rss);
fclose($fp);

return true;
**********************************************

On IIS I'm not getting any errors returned (even if I remove the '@').
If I remove the 'if file exists' stuff then I'm no better off - nothing seems 
to happen at all.

The dir and file are writable.

I'm afraid that I can't understand the notes on php.net about this stuff. Can 
anyone tell me what I might need to change to get this working on the new 
server?

Thanks very much - dunstan

---------------------------
Dorset, England
http://www.1976design.com/
http://www.orchard.it/
http://www.maccaws.org/


More information about the thelist mailing list