php newbie... copy command?

  • thecodman
  • Graduate
  • Graduate
  • User avatar
  • Posts: 171
  • Loc: CT, USA

Post 3+ Months Ago

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
  • b_heyer
  • Web Master
  • Web Master
  • User avatar
  • Posts: 4581
  • Loc: Maryland

Post 3+ Months Ago

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.
  • thecodman
  • Graduate
  • Graduate
  • User avatar
  • Posts: 171
  • Loc: CT, USA

Post 3+ Months Ago

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
  • Posts: 4581
  • Loc: Maryland

Post 3+ Months Ago

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.
  • thecodman
  • Graduate
  • Graduate
  • User avatar
  • Posts: 171
  • Loc: CT, USA

Post 3+ Months Ago

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 98 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
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.