3dhomejoe Posted March 5, 2007 Share Posted March 5, 2007 Hello,I would like to copy files from a folder to a folder made by a user request on a website (to have it some what like this http://sclek.com/?p=Free_AddLink) so i can host some scrips for free on my websiteand i dont have any scripts yetThanks3dhomejoe Link to comment Share on other sites More sharing options...
Xenon Design Posted March 5, 2007 Share Posted March 5, 2007 Well im guessing you could use something like this: <?php$file = 'folder/a/example.txt';$newfile = 'folder/b/example.txt';if (!copy($file, $newfile)) { echo "failed to copy $file...\n";}?> That may work. But if it doesnt then you may have to give it a full path (ex. 'C:/WebServer/folder/a' etc).Have a rummage around in -> http://php.filearena.net/manual/en/function.copy.phpAnd also explore more of the Filesystem area of the functions for something better. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now