I have tried "SmartReName" and other progs alike.
PHP has a hard time recongizing the extension.
$picsExtName = $picsPathParts["extension"]; //ex.= jpg
this Happens ONLY when all the pictures are renamed in a batch process.
Any ideas anyone?

Moderators: macek, egami, gesf


function file_copy($file_origin, $destination_directory, $file_destination, $overwrite, $fatal) {
if ($fatal) {
$error_prefix = 'FATAL: File copy of \'' . $file_origin . '\' to \'' . $destination_directory . $file_destination . '\' failed.';
$fp = @fopen($file_origin, "r");
if (!$fp) {
echo $error_prefix . ' Originating file cannot be read or does not exist.';
exit();
}
$dir_check = @is_writeable($destination_directory);
if (!$dir_check) {
echo $error_prefix . ' Destination directory is not writeable or does not exist.';
exit();
}
$dest_file_exists = file_exists($destination_directory . $file_destination);
if ($dest_file_exists) {
if ($overwrite) {
$fp = @is_writeable($destination_directory . $file_destination);
if (!$fp) {
echo $error_prefix . ' Destination file is not writeable [OVERWRITE].';
exit();
}
$copy_file = @copy($file_origin, $destination_directory . $file_destination);
}
} else {
$copy_file = @copy($file_origin, $destination_directory . $file_destination);
}
} else {
$copy_file = @copy($file_origin, $destination_directory . $file_destination);
}
}
--------------
Example Usage:
$copy = file_copy("/path/to/original.file", "/path/to/", "destination.file", 1, 1);
Return to PHP coding => Images
Users browsing this forum: No registered users and 1 guest