Best way to do this?

Egoista

Up-and-Coming Sensation
Joined
Oct 12, 2012
Messages
278
Reaction score
0
FP$
2
I'm trying to find the best way to create a directory upon user registration. Is there a PHP script for that or what?
 
Use mkdir() to do it.

mkdir("foldername", $chmod, $recursive)

Replace foldername with your directory name, $chmod with the chmod the folder should have (777 for full access). If you need mkdir to create folders recursively, set the 3rd parameter to true (which when you suggest a directory name like "path/folder" it will first create a folder named path and then create a folder named folder).

The method will return true upon successful creation and false if something fails.
 
Thank you, I'll try and use that, I want the folder to be the username of the individual. We'll see how I can make it work, thank you very much for your help. +rep
 
Back
Top Bottom