Skip to content

Instantly share code, notes, and snippets.

@dzarezenko
Created November 7, 2009 23:50
Show Gist options
  • Save dzarezenko/228955 to your computer and use it in GitHub Desktop.
Save dzarezenko/228955 to your computer and use it in GitHub Desktop.
<?php
$config_path_image_upload = ROOT_DIR . "/uploads/posts/" . FOLDER_PREFIX . "/";
$config_path_image_upload_2 = "/var/www/vhosts/9lives.in.ua/httpdocs/uploads/posts/" . FOLDER_PREFIX . "/";
// $destinationImagePath = $config_path_image_upload . $file_prefix . $image_name;
$destinationImagePath = $config_path_image_upload . $site_name . $file_prefix . "." . $type;
$destinationImagePath_2 = $config_path_image_upload_2 . $site_name . $file_prefix . "." . $type;
if ($urlcopy != "yes") {
@move_uploaded_file($image, $destinationImagePath) or $img_result = "<div><font color=red>{$lang['images_uperr_3']}<br /><br />{$error_code}</font></div>";
@move_uploaded_file($image, $destinationImagePath_2) or $img_result = "<div><font color=red>{$lang['images_uperr_3']}<br /><br />{$error_code}</font></div>";
} else {
@copy($imageurl, $destinationImagePath) or $img_result = "<div><font color=red>$lang[images_uperr_3]</font></div>";
@copy($imageurl, $destinationImagePath_2) or $img_result = "<div><font color=red>$lang[images_uperr_3]</font></div>";
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment