Forum Moderators: coopster

Message Too Old, No Replies

Copying files from a server to another

copy() or bash cp?

         

ahmedtheking

12:35 pm on Nov 7, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I'm looking at ways I can present files to my client without them having to search through the server. One idea was to get the server to copy files accross a lan from itself to the cliet's computer. Can this be done via copy() or will it have to be bash cp?

eelixduppy

8:54 pm on Nov 7, 2006 (gmt 0)



You are going to have to use cp. I'm almost positive a php function will not do this for you.

With that being said, if you are doing this from php, a call to exec [us2.php.net] with the correct command should do the trick assuming you have access to the destination.


Note: When safe mode is enabled, you can only execute executables within the safe_mode_exec_dir [us2.php.net]. For practical reasons it is currently not allowed to have .. components in the path to the executable.

Good luck!