note 5242 deleted from file_exists by ronabop
| From: | ronabop@php.net | Date: | Sun, 27 Aug 2000 11:38:08 +0000 |
| Subject: | note 5242 deleted from file_exists by ronabop | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-3465@lists.php.net to get a copy of this message | ||
<pre>
if (!file_exists($file) {
$fp = fopen("temp.phtml", "w");
fputs($fp, $entry);
fclose($fp);
copy("temp.phtml", $catgr . "/" . $newfile);
chmod($catgr . "/" . $newfile, 0777);
</pre>
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.