0

I have a script that registers users and i want to implement in it this function to make for each user a folder with the name they supply so i used

$user_folder = mkdir($_SERVER['HTTP_HOST'].'/user/'.$name, 0755);

$name is the name they supplyed in the form

so i get this "Warning: mkdir() [function.mkdir]: No such file or directory in /home/public_html/registration/index.php on line 139"
Why?

2
Contributors
4
Replies
14
Views
3 Years
Discussion Span
Last Post by devianleong
0

ok it seems not to work so i added

$target = 'http://'.$_SERVER['HTTP_HOST'].'/user/'.$name;
if (!is_dir($target)) {
     mkdir($target, 0777);
}

and still doesn't work

Edited by andreiviziru

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.