Forum Moderators: coopster
<?php
$file="test.txt";
$fp=fopen("$file","w");
chmod($index, 0777);
$content = "Hello, I am a File!";
fwrite($fp,$content);
chmod($index, 0644);
fclose($fp);
if (file_exists($file)) {
echo "<br>The file $file exists";
} else {
echo "<br>The file $file does not exist";
}
echo "</pre>";
?>
Any idea?