0
CMS 사진 갤러리를 시도하고 있으며 upload.php 파일 끝에 축소판을 만들어야합니다. 'showphotos.php'페이지에서 실행할 때 잘 작동하는 create_square_image라는 함수가 있습니다. 그러나 누군가가 페이지를 볼 때마다 실행되도록하고 싶지 않습니다. create_square_image (문자열 $ 파일 이름, 문자열 $ 대상, 크기) 내가 몇 번을 시도하고있다SWFUpload를 사용하여 축소판 만들기
: 나는
// Process the file
/*
At this point we are ready to process the valid file. This sample code shows how to save the file. Other tasks
could be done such as creating an entry in a database or generating a thumbnail.
Depending on your server OS and needs you may need to set the Security Permissions on the file after it has
been saved.
*/
$thumb_save = "uploads/thumbs/thumb_" . $_FILES[$upload_name]["tmp_name"];
create_square_image($_FILES[$upload_name]["tmp_name"],$thumb_save,100);
if ([email protected]_uploaded_file($_FILES[$upload_name]["tmp_name"], $save_path.$file_name)) {
HandleError("File could not be saved.");
exit(0);
}
exit(0);
create_square_image 기능이 형식을 사용하여 ... SWFUpload에 다음과 같은 추가 시도 이미지는 저장하지만 축소판은 저장하지 않습니다.