Your code works for me on Windows 2000 with IIS and Windows 2000 with Apache.
Could it be file permissions on the server. -----Original Message----- From: Radovan Radic [mailto:rasho@;ving.co.yu] Sent: Monday, October 28, 2002 9:25 AM To: [EMAIL PROTECTED] Subject: [PHP-WIN] Create file! Hi (Win2000, PHP 4.0.6 IIS) $filename="streets.dat"; if (file_exists($filename)) { Read From File; Print To Html; } else { $f=fopen($filename,"w"); read from database to file; Print To Html; fclose($f); } But fopen will not create $filename, and i get an error like: You dont have permission to create file ... Although the manual says: 'w' - Open for writing only; place the file pointer at the beginning of the file and truncate the file to zero length. If the file does not exist, attempt to create it. How to simply create file in php? Radovan -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php