正如標題所說..如何將圖像移動/重命名爲新文件夾? 我有這個迄今爲止,新的圖像的大小/裁剪,但它不會移動到「新/」文件夾:如何將圖像移動到新文件夾?
$in_filename = '4csrWqu9ngv.jpg';
list($width, $height) = getimagesize($in_filename);
$offset_x = 0;
$offset_y = 0;
$new_height = $height - 65;
$new_width = $width;
$image = imagecreatefromjpeg($in_filename);
$new_image = imagecreatetruecolor($new_width, $new_height);
imagecopy($new_image, $image, 0, 0, $offset_x, $offset_y, $width, $height);
header('Content-Type: image/jpeg');
imagejpeg($new_image);
$move_new = imagejpeg($new_image);
rename($move_new, 'new/' . $move_new);
一如往常的任何幫助表示讚賞:)
謝謝你糾正我的錯誤,現在的偉大工程:) – Dizzi 2011-04-24 20:46:02