Re: php file/app/dialog to copy folders
| From: | Richard Lynch | Date: | Tue, 03 Oct 2006 17:48:15 +0000 |
| Subject: | Re: php file/app/dialog to copy folders | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-242553@lists.php.net to get a copy of this message | ||
On Tue, October 3, 2006 12:09 am, bruce wrote:
> i'm wondering if anyone has a class/chunk of code to copy a folder to
> another folder, along with the underlying descendents
> (files/folders)...
>
> i'm considering a file management app, and i'd like to allow the user
> to
> select a folder, and then to copy the folder to another folder
> location...
Off the top of my head:
exec("cp -Ra $source $destination", $output, $error);
if ($error){
echo perror($error); //see http://l-i-e.com/perror
echo nl2br(htmlentities(implode("", $output)));
exit;
}
You're on your own to scrub $source and $destination, as that is a
custom tailoring job, not an off the rack job.
--
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?