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.. Link to comment https://forums.phpfreaks.com/topic/43881-copying-a-file-from-on-server/ Share on other sites More sharing options...
Lumio Posted March 22, 2007 Share Posted March 22, 2007 http://us2.php.net/copy Link to comment https://forums.phpfreaks.com/topic/43881-copying-a-file-from-on-server/#findComment-213007 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. Link to comment https://forums.phpfreaks.com/topic/43881-copying-a-file-from-on-server/#findComment-213011 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)); Link to comment https://forums.phpfreaks.com/topic/43881-copying-a-file-from-on-server/#findComment-213013 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? Link to comment https://forums.phpfreaks.com/topic/43881-copying-a-file-from-on-server/#findComment-213014 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.