php - Upload image to this domain and also a subdomain -
i have image uploading script works fine when uploading image domain it's on, need upload same image alternate subdomain.
here's bit of code i'm having trouble with.
$filename = "../../images/home-features/" . $imagename; $filename2 = "/var/www/vhosts/domain.org/httpdocs/images_home/features/" . $imagename; imagejpeg($tmp,$filename,60); imagejpeg($tmp,$filename2,60);
it's second of 2 not uploading. don't errors - it's if has worked image not there.
any ideas?
i dont know why second image isnt coming through same resource. maybe resource needs rewinding/resetting.
but why let server same work on again? copy first file second!
copy($filename, $filename2);
ps. did check directory second file writable?
Comments
Post a Comment