SFADuncan
03-13-2005, 04:38 AM
Hi...
I want to go into a number of directories, get all the .jpgs, and copy them to another set of corresponding directories...
This is my pathetic attempt so far....
function copy_img_photo_img($wwwname, $photype, $phono, $pictitle, $picdesc)
{
include ("variables.php");
foreach (glob("/home/virtual/".$url."/var/www/html/".$wwwname."/photo/".$photype."/*.jpg") as $filename)
$new_place = "/home/virtual/".$url."/var/www/html/".$wwwname."/photo_img/".$photype"/");
copy($filename, $new_place);
}
Any ideas?
I want to go into a number of directories, get all the .jpgs, and copy them to another set of corresponding directories...
This is my pathetic attempt so far....
function copy_img_photo_img($wwwname, $photype, $phono, $pictitle, $picdesc)
{
include ("variables.php");
foreach (glob("/home/virtual/".$url."/var/www/html/".$wwwname."/photo/".$photype."/*.jpg") as $filename)
$new_place = "/home/virtual/".$url."/var/www/html/".$wwwname."/photo_img/".$photype"/");
copy($filename, $new_place);
}
Any ideas?