note 5243 modified in file_exists by ronabop

From: Date: Mon, 02 Oct 2000 10:35:57 +0000
Subject: note 5243 modified in file_exists by ronabop
Groups: php.notes 
Request: Send a blank email to php-notes+get-5880@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/function.file-exists.php

« previous php.notes (#5880) next »