Hello all its been a while, I have a question on the script below. Here is what I would like to do.
Take $file after fwrite has processed and add it to $dir.
The Script creates the Directory and the file. I just need it to add the File to the directory
<?php
$dir = 'myDir';
$file = 'myFile.php';
// check the directory to see if it already exists
if( is_dir($dir) === false )
{
// if it doesn't make a new directory
mkdir($dir);
}
// start a new stream
$f = fopen($file, 'w'); // 'w' for write
// write the php to the stream
fwrite( $f, '<?php echo "Hello world! 123456"; ?>' );
// close the stream
fclose($f);
// Now Take $file after fwrite has processed and add it to $dir.
// The Script creates the folder and the file. I just need it to add this File to the folder now..
?>