class.upload.php is a powerful and mature PHP class to manage uploaded files, and manipulate images in many ways. The script is available under a GPL license.
more info about the class
- You can use all these before calling process()
file_src_name : 通告001學生守則.pdf
file_src_name_body : 通告001學生守則
file_src_name_ext : pdf
file_src_pathname : /tmp/php0vxXtk
file_src_mime : application/pdf
file_src_size : 143810 (max= 31457280)
file_src_error : 0
- filedir : 2011/09/09
process file to /webhome/web/www/pic_lib/2011/09/09/
- file size OK
- file mime OK : application/pdf
- file name safe format
- destination variables
file_dst_path : /webhome/web/www/pic_lib/2011/09/09/
file_dst_name_body : CueU001AnOUO
file_dst_name_ext : pdf
- checking for auto_rename
auto_rename to CueU001AnOUO_1.pdf
- destination file details
file_dst_name : CueU001AnOUO_1.pdf
Result in Windows IIS Platform: (The file could not be removed by web)
source variables
- You can use all these before calling process()
file_src_name : 通告001學生守則.pdf
file_src_name_body : 通告001學生守則
file_src_name_ext : pdf
file_src_pathname : C:\WINDOWS\Temp\php24.tmp
file_src_mime : application/pdf
file_src_size : 143810 (max= 2097152)
file_src_error : 0
- filedir : 2011/09/09
process file to C:/web.log/pic_lib/2011/09/09/\
- file size OK
- file mime OK : application/pdf
- file name safe format
- destination variables
file_dst_path : C:/web.log/pic_lib/2011/09/09/
file_dst_name_body : £Cu£eU001£A£n££O£UO
file_dst_name_ext : pdf
- checking for auto_rename
- destination file details
file_dst_name : £Cu£eU001£A£n££O£UO.pdf