RE: [PHP-WIN] Create file!

From: Date: Mon, 28 Oct 2002 14:52:20 +0000
Subject: RE: [PHP-WIN] Create file!
Groups: php.windows 
Request: Send a blank email to php-windows+get-16590@lists.php.net to get a copy of this message
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: php-windows@lists.php.net 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

« previous php.windows (#16590) next »