PDA

View Full Version : makedir()


winterdude
06-21-2007, 06:24 PM
Hi. I was just wondering, is it possible when you use the makedir() command to add a default file to the created directory.

For Example: If a user signs up they would have a personal page at www.yoursite.com/user

Instead of having that be a big blank page, could you have a set file (index.html) added to the new directory when it is created.

Mwnciau
06-21-2007, 06:27 PM
makedir($username);

copy('defaultindex.html', $username . '/index.html');

GJay
06-21-2007, 10:34 PM
I'm sure you'll realise this soon enough, but the function is mkdir() :)

Mwnciau
06-22-2007, 08:25 AM
oops :rolleyes: