文件名称:IPB上传类,注释中有使用方法
文件大小:3KB
文件格式:ZIP
更新时间:2013-08-11 17:07:17
ipb,上传类,php上传类
很漂亮的上传类,可以参考使用一下 $upload = new class_upload(); * $upload->out_file_dir = './uploads'; * $upload->max_file_size = '10000000'; * $upload->make_script_safe = 1; * $upload->allowed_file_ext = array( 'gif', 'jpg', 'jpeg', 'png' ); * $upload->upload_process(); * * if ( $upload->error_no ) * { * switch( $upload->error_no ) * { * case 1: * // No upload * print "No upload"; exit(); * case 2: * case 5: * // Invalid file ext * print "Invalid File Extension"; exit(); * case 3: * // Too big... * print "File too big"; exit(); * case 4: * // Cannot move uploaded file * print "Move failed"; exit(); * } * } * print $upload->saved_upload_name . " uploaded!";
【文件预览】:
class_upload.php