Re: php file/app/dialog to copy folders

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux