cdh47315
New Member
- Messages
- 7
- Reaction score
- 0
- Points
- 0
I'm making a test script for a web application I'm developing, and in the registration of that web app I have a small script in which it makes a few folders under the user's name.
Here is my code:
The line that prints the string "Registration... log in" works just as expected, and I can take out the mkdir() lines and the script will execute perfectly.
With the mkdir() lines, I get this warning message:
Anyone know why I'm getting this?
I looked around and saw that x10hosting doesn't use Safe Mode, so that shouldn't be the problem.
EDIT:Also, it should be noted that under the folder "filesystem" it creates a directory called "home" and has all the subdirectories under it that it should, but "home" should be created under the user's own personal folder!
Here is my code:
PHP:
//If there is not error
if(!$user->has_error()) {
$userdir = "filesystem/".$username;
//BEGIN USER FILESYSTEM CREATION
mkdir($userdir."/");
mkdir($userdir."/home/");
mkdir($userdir."/home/media/");
mkdir($userdir."/home/scripts/");
mkdir($userdir."/home/desktop/");
//END USER FILESYSTEM CREATION
$user->error("Registration successful! You may now log in.");
}
}
With the mkdir() lines, I get this warning message:
And the <folder> directories do have different names...Warning: mkdir() [
function.mkdir
]: File exists in /home/cdh473/public_html/<folder>/<folder>/register.php on line 22
Anyone know why I'm getting this?
I looked around and saw that x10hosting doesn't use Safe Mode, so that shouldn't be the problem.
EDIT:Also, it should be noted that under the folder "filesystem" it creates a directory called "home" and has all the subdirectories under it that it should, but "home" should be created under the user's own personal folder!
Last edited: