php newbie... copy command?

  • thecodman
  • Graduate
  • Graduate
  • User avatar
  • Joined: Jun 10, 2003
  • Posts: 171
  • Loc: CT, USA
  • Status: Offline

Post March 9th, 2004, 1:24 pm

Hi,

Im in the process of writing a php script to auto install forums for my site: fbhosting.net

For part of the script i need to create a directory with the username the person requests as its name and then copy all of the required forum files into that folder from a central directory

How would i do this?

Also...don't know if it makes a difference but the site is remotely hosted so i dont have access to internal system files.

I will provide 3 months of free ad-space to anyone that helps me get this working.

Thanks,
The CodMan
jason-c@comcast.net
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post March 9th, 2004, 1:24 pm

  • b_heyer
  • Web Master
  • Web Master
  • User avatar
  • Joined: Jun 15, 2003
  • Posts: 4583
  • Loc: Maryland
  • Status: Offline

Post March 9th, 2004, 1:45 pm

To create the directory you'll need to use the mkdir(); function ( http://www.php.net/manual/en/function.mkdir.php )

To copy the files you'll need to use the copy() function ( http://www.php.net/manual/en/function.copy.php )

PS If this qualifies as helping, I'll donate my free three months to Ozzu.
Pixel Acres V2
  • thecodman
  • Graduate
  • Graduate
  • User avatar
  • Joined: Jun 10, 2003
  • Posts: 171
  • Loc: CT, USA
  • Status: Offline

Post March 9th, 2004, 2:00 pm

this looks to be what i need...

but, how would i encorporate this into my script?

Don't know if it helps but i thinking somethin like this: for the submit script. I'm really new to this so any and all help is much appreciated!

<html><head><title></title>
<style type="text/css">
</style>
</head>
<body>



<center>
Your forum will be at http://circlesarefun.com/forums/<u>Desired URL</u>/, this <b>cannot</b> be changed later.
</center>

<table cellspacing=0 cellpadding=3 border=0 align=center>
<form name="install" method="POST" action="redirect.php">


<tr><td>Desired URL: </td><td> <input type="text" size="25" maxlength="50" name="url"></td></tr>

<tr><td>Username: </td><td> <input type="text" size="25" maxlength="25" name="user"></td></tr>

<tr><td>Password: </td><td> <input type="password" size="25" maxlength="25" name="pass"></td></tr>
<tr><td>Password Again: </td><td> <input type="password" size="25" maxlength="25" name="pass2"></td></tr>

<tr><td>Email: </td><td> <input type="text" size="25" maxlength="50" name="email"></td></tr>
<tr><td>Email Again: </td><td> <input type="text" size="25" maxlength="50" name="email2"></td></tr>


<tr><td colspan=2><input type="checkbox" name="tos" value="yes">I have read the <a href="http://www.fbhosting.net/terms.htm">Terms Of Service</a> and agree to it.</td></tr>

<tr><td colspan=2 align=center><input type="submit" value="Submit" name="submit" class="submit"></td></tr>

</form>
</table>
</body></html>
  • b_heyer
  • Web Master
  • Web Master
  • User avatar
  • Joined: Jun 15, 2003
  • Posts: 4583
  • Loc: Maryland
  • Status: Offline

Post March 9th, 2004, 4:42 pm

First off I'd recommend not setting it up directly after they register. I'd suggest having them need to activate your account.

What you are trying to do will be extremely difficult for a new php programmer. I'd highly recommend learning php before you bite this much off.
Pixel Acres V2
  • thecodman
  • Graduate
  • Graduate
  • User avatar
  • Joined: Jun 10, 2003
  • Posts: 171
  • Loc: CT, USA
  • Status: Offline

Post March 9th, 2004, 5:06 pm

b_heyer wrote:
First off I'd recommend not setting it up directly after they register. I'd suggest having them need to activate your account.


How would i encorporate something like this into the script?

Post Information

  • Total Posts in this topic: 5 posts
  • Users browsing this forum: No registered users and 190 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 2011 Unmelted, LLC. Ozzu® is a registered trademark of Unmelted, LLC.