Jump to content

[SOLVED] Automating redirect file creation


neridaj

Recommended Posts

mkdir may not be the best answer. try this:

<?php
$folder = $username; //Whatever values you like for what $folder equals
$file = $filename; //what you want the file to be
$fh = fopen($folder."/".$file, 'w+');
$content = "this is the content going in the file";
fwrite($fh, $content);
fclose($fh);
?>

This will make the file for you, in their folder, and place the content $content in it, and close the file back up.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.