PHP Code21 Apr 2006 07:00 pm
Using php to create or touch a file, first checks to see if it already exists.
CODE:
-
<?php
-
//set the filename or passed from form argument
-
$filename = "/path/filenane.ext";
-
//does the file exist?
-
if (!file_exists($filename)) {
-
//create the filename
-
touch($filename);
-
//set permissions
-
chmod($filename,666);
-
}
-
?>
April 25th, 2006 at 7:21 am
Great deal. JericoX