note 5243 deleted from function.file-exists by jimw

From: Date: Wed, 02 Jan 2002 01:01:04 +0000
Subject: note 5243 deleted from function.file-exists by jimw
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-24074@lists.php.net to get a copy of this message
if (!file_exists($newfile)) { $fp = fopen("temp.phtml", "w"); fputs($fp, $entry); fclose($fp); copy("temp.phtml",$newfile); chmod($catgr . "/" . $newfile, 0777); this should create a file with whatever data you want as the body. I've found that sometime the file permission are off, so i'd have to open an empty file which i leave on the server, then copy that file to the newfile, using chmod to set the permission so i can edit it later.

« previous php.notes (#24074) next »