copying folders and files.

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
tommy1987
Forum Commoner
Posts: 92
Joined: Tue Feb 21, 2006 8:35 pm

copying folders and files.

Post 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?
User avatar
Luke
The Ninja Space Mod
Posts: 6424
Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA

Post by Luke »

copy() maybe?
User avatar
Burrito
Spockulator
Posts: 4715
Joined: Wed Feb 04, 2004 8:15 pm
Location: Eden, Utah

Post by Burrito »

The Ninja Space Goat wrote:copy() maybe?
and mkdir()
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post 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?
User avatar
Luke
The Ninja Space Mod
Posts: 6424
Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA

Post 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. :)
Post Reply