move file from domain to subdomain
Posted: Wed Aug 24, 2011 4:49 pm
Hey all,
can anyone give me any pointers on how can I move a file from the main domain to a subdomain.
I've tried copy() and it didn't work.
I thought it was just a folder permission thing but after setting the destination folder to chmod 777 it still didnt work.
error reporting is turned off so I can't see exactly what the error message is.
box is rehl with plesk
php code
Any help is greatly appreciated
can anyone give me any pointers on how can I move a file from the main domain to a subdomain.
I've tried copy() and it didn't work.
I thought it was just a folder permission thing but after setting the destination folder to chmod 777 it still didnt work.
error reporting is turned off so I can't see exactly what the error message is.
box is rehl with plesk
php code
Code: Select all
$path1 = "/var/www/vhosts/domain.com/httpdocs/new/test/test.jpg";
$path2 = "/var/www/vhosts/domain.com/subdomains/img/httpdocs/test/test.jpg";
if (!copy($path1, $path2)) {
echo "failed to copy the file...";
}