Jump to content

How can I copy a directory?


tibberous

Recommended Posts

There's a couple examples of how to do it on Google, just search "php copy directory"

 

No. There isn't. I've been googling, and then yahoo'ing this for damn near 6 hours. And I'm trying to do it through ftp, not just through the file system, so "php copy directory" isn't going to get me shit.

Dude,

I don't know if it will work because of security issues.  I tried for half a day at work to have files/directories copied from our web server to our file server (two different computers) and it would not have anything to do with it.  My boss and I had stabbed and stabbed at it until we came to the conclusion it may not be possible. 

 

The thing we did to get around it was setup xampp lite directory on the file server and ran the services from the webserver pc. Therefore file transfers were easy because we were handling them completely on the file server with only one php program being hosted from that pc. That was an odd situation and I don't know if that provides you with any insight on how to get around or solve it but let me know if you find anything.

Here's the solution I came up with. It takes the remote folder and saves it to the local hard drive.

 

It's a command line app, so you basically run it like: php get.php domain.com username password

 

It saves all the files in your sites folder/domainname.

 

<?php


?>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.