note 5243 modified in file_exists by ronabop

From: Date: Sat, 13 Jan 2001 08:10:38 +0000
Subject: note 5243 modified in file_exists by ronabop
Groups: php.notes 
Request: Send a blank email to php-notes+get-9753@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. http://www.php.net/manual/file-exists.php

« previous php.notes (#9753) next »