php copy() using destination absolute path -
i cannot google anywhere 1 cannot use absolute path in copy() destination. however,
$baseurl_master_mm = "http://mysite.öä/mm/"; $img_dir = 'img_1'; $img = '01.jpg'; $orig_online = $baseurl_master_mm.$img_dir.'/'.$img; $dest_online = '../../mm_img/'.$img_dir.'-online.jpg'; $copy = copy($orig_preview, $dest_preview);
works fine, same absolute path
$baseurl_master_mm = "http://mysite.öä/mm/"; $baseurl_master_mm_online = "http://mysite.öä/mm_img/"; $img_dir = 'img_1'; $img = '01.jpg'; $orig_online = $baseurl_master_mm.$img_dir.'/'.$img; $dest_online = $baseurl_master_mm_online.$img_dir.'-online.jpg'; $copy = copy($orig_preview, $dest_preview);
will give no errors , copies no files.
destination directory exists, , rights 777. missing something?
you can't use http protocol copy file on server. taken php documentation on http wrapper
allows read-only access files/resources via http 1.0, using http method.
to copy local server, use absolute path.
Comments
Post a Comment