我正在尝试开发一个 PHP 驱动的画廊,其形式至少有四个文件上传框,每个都有自己的标题和标题。我一直在使用 php.upload.class 来处理上传的照片,但不确定如何在保留其详细信息(标题、标题)的同时处理每个单独的上传。
有没有一种实用的方法可以做到这一点,或者我应该只上传照片,然后让用户在下一页添加标题和说明文字?任何帮助/建议将不胜感激。
谢谢!
我正在尝试开发一个 PHP 驱动的画廊,其形式至少有四个文件上传框,每个都有自己的标题和标题。我一直在使用 php.upload.class 来处理上传的照片,但不确定如何在保留其详细信息(标题、标题)的同时处理每个单独的上传。
有没有一种实用的方法可以做到这一点,或者我应该只上传照片,然后让用户在下一页添加标题和说明文字?任何帮助/建议将不胜感激。
谢谢!
This is my suggestion, you can use this jquery multiupload file to ease of to multi uploading file plus better interface rather than to organize multi input boxes.
you can use this is image resizer to dynamically resize your picture rather than to create another file, it will cache your picture then some sort of up a little bit perfomance. Just go to the site and only download 1 image.php file. There will be example that you can test and play of.
For the caption, suggest that you will make something like display all file list and multi update at once, sorry i don't really have much time for doing it myself but this is what I will do many times.
以下是我将要做的简单细分:
我会在从 1 开始到 $_FILES 数组末尾的 for 循环中执行此操作
更新 1
for($i = 0; $i <= $num_files; $i++) {
$file = $_FILES["file1"];
move_uploaded_file($file, $file_destination)
// store caption and title code here
}
?>
类似的东西。我对您正在使用的课程一无所知,所以我无法真正帮助您。