Sinkbæk wrote in dk.edb.internet.webdesign.serverside.php:
> Hvad står der så på linie 111 og 155?
if (file_exists($image_src."/".$image_media_file)) {
$file_extension = get_file_extension($image_media_file);
$file_name = get_file_name($image_media_file);
$n = 2;
$copy = "";
while
(file_exists($image_dest."/".$file_name.$copy.".".$file_extension)) {
$copy = "_".$n;
$n++;
}
$new_file = $file_name.$copy.".".$file_extension;
111-> $ok = copy($image_src."/".$image_media_file,
$image_dest."/".$new_file);
$image_media_file = $new_file;
}
function copy_thumbnail($image_media_file, $image_thumb_file,
$from_cat = 0, $to_cat = 0) {
if (is_remote($image_thumb_file)) {
return $image_thumb_file;
}
$thumb_src = ($from_cat != -1) ? THUMB_PATH.(($from_cat != 0) ?
"/".$from_cat : "") : THUMB_TEMP_PATH;
$thumb_dest = ($to_cat != -1) ? THUMB_PATH.(($to_cat != 0) ?
"/".$to_cat : "") : THUMB_TEMP_PATH;
$thumb_src_file = $thumb_src."/".$image_thumb_file;
if ($image_thumb_file != "" &&
file_exists($thumb_src."/".$image_thumb_file)) {
$thumb_extension = get_file_extension($image_thumb_file);
$new_thumb =
get_file_name($image_media_file).".".$thumb_extension;
if (file_exists($thumb_dest."/".$new_thumb)) {
unlink($thumb_dest."/".$new_thumb);
}
155 ->$ok = copy($thumb_src."/".$image_thumb_file,
$thumb_dest."/".$new_thumb);
if ($ok) {
@unlink($thumb_src_file);
@chmod($thumb_dest."/".$new_thumb, CHMOD_FILES);
$image_thumb_file = $new_thumb;
}
}
return $image_thumb_file;
}
Ole
--
Vil du lære at kode HTML, XHTML, CSS, SSI eller ASP ???
- Pædagogiske tutorials på dansk
- Kom godt i gang med koderne
KLIK HER! =>
http://www.html.dk/tutorials