Page 1 of 1

copying folders and files.

Posted: Tue Nov 07, 2006 2:29 pm
by tommy1987
I am trying to set up a registration system, whereby a user can register and make posts, I want to create a folder for users automatically upon registering and they should contain 1 file called index.php. There is a copy of this file on the webserver called index.php.

Hence all I need to do is write code to create a folder called the username and copy this file into it. Anyone know how this is done?

Posted: Tue Nov 07, 2006 2:30 pm
by Luke
copy() maybe?

Posted: Tue Nov 07, 2006 4:12 pm
by Burrito
The Ninja Space Goat wrote:copy() maybe?
and mkdir()

Posted: Tue Nov 07, 2006 8:14 pm
by feyd
Create folders for each user? Why not use mod_rewrite and save all the space that'd be eaten by nearly empty folders?

Posted: Wed Nov 08, 2006 1:04 am
by Luke
good call feyd... tommy, if you don't know what mod_rewrite is, just ask... we'd be happy to help you out man. :)