Okay, my ultimate goal here is when a user submits a form, it's going to put a new index.php file into the specified directory, which would redirect it to a page I defined. Is there any way to do this?
Yes, it's possible but you need way more information than just what you provided. With what you're trying to do you might be able to use mod_rewrite and just one file. It all depends on what you're trying to do though.
I seen your post about mkdir so this may be what your after
Code:
$filecontent="Code For File To Insert";
mkdir('/home/path/public_html/'.$username, 0777);
if ($fp = fopen("/home/path/public_html/".$username."/index.php", "w")) {
fwrite($fp, $filecontent);
chmod("/home/path/public_html/".$username."/index.php", 0755);
fclose($fp);
}
I could've used that a couple of hours ago! Haha, I was able to figure it out on my own though! Thanks anyways, hopefully that'll alleviate some time for other users who wanted to do what I did; but of course I did mine the hard, "on-my-own" way... heh
I could've used that a couple of hours ago! Haha, I was able to figure it out on my own though! Thanks anyways, hopefully that'll alleviate some time for other users who wanted to do what I did; but of course I did mine the hard, "on-my-own" way... heh
I should have been a little faster lol sorry I was coding on something else.