Hello,
Have this small script:
<?php
$dirname = $_POST["username"];
$filename = "/folder script in//{$dirname}/";
if (file_exists($_POST["username"];)) {
header ( "Location: " . $_POST["username"]);
} else {
mkdir("folder script in// {$dirname}", 0777);
echo "welcome " . $_POST["username"] . "Your Area Is Being created.";
}
?>
When a member logs in this scripted is called, it SHOULD either direct an existing member to their area, or create a new folder if the member has just joined.
When i do run it this error message happens:
Warning: mkdir() [function.mkdir]: Permission denied in /home/vars1/public_html/var2/vars3/var4/var5/var6/file on line 8
welcome Your Area Is Being created.
This looks to me as if the script is trying to write to the folder it's located in, that will not happen, because the write permissions on that folder will not allow that.
I want the script to create a directory two folders deeper, how can I do this? (the folder I want the script to write to has write permissions turned on (0777)).
please can anyone help me with this, I still have to get the files moved from one folder to another when this is done, but can't even begin works on that, (you can move files with php, just I haven't seen a move command in my book)?
DG