tcorbeil Posted March 22, 2007 Share Posted March 22, 2007 Let's say I have a file on my server at location: /public_html/Global/oilers.php ...and i want to copy this file and save it to another directory (using ftp commands): /public_html/hockey/Oilers/oilers.php How would I go about.... I gigured out how to login using ftp commands and explored the ftp command available.. (eg.put, get etc..) but I'm not sure which command to use.. can someone point me in the right direction? Thanks. Note: I figured out how to login using ftp commands and such so.. i got that far.. Quote Link to comment Share on other sites More sharing options...
Lumio Posted March 22, 2007 Share Posted March 22, 2007 http://us2.php.net/copy Quote Link to comment Share on other sites More sharing options...
tcorbeil Posted March 22, 2007 Author Share Posted March 22, 2007 Lumio, thank you. I was hoping to do this in an ftp command but.. can you run by me how you would login to the server with this scenario? Or, is that i can login ftp style but still do what you pointed out? Thanks. T. Quote Link to comment Share on other sites More sharing options...
tcorbeil Posted March 22, 2007 Author Share Posted March 22, 2007 Also, could I put the paths in these variables such as: $file = "/public_html/Global/oilers.php"; $newfile = "/public_html/hockey/Oilers/oilers.php"; (!copy($file, $newfile)); Quote Link to comment Share on other sites More sharing options...
tcorbeil Posted March 22, 2007 Author Share Posted March 22, 2007 sorry.. after having read some more, it looks like the rename function would better suite.. ok, I guess my question is this: If i login to the server using ftp commands, can I then use the rename function? is the ftp_rename function the same thing? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.