Changeset 3889 for branches/2.2/filemanager/inc/upload.php
- Timestamp:
- 03/22/11 18:19:49 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2/filemanager/inc/upload.php
r3881 r3889 2 2 3 3 require_once '../../header.session.inc.php'; 4 5 $post_limit = error_get_last( ); 6 7 if ( preg_match( '/POST Content-Length of (\d+) bytes exceeds the limit of \d+ bytes/i', $post_limit[ 'message' ], $matches ) ) 8 { 9 $_SESSION['response'] = serialize( array( 10 'postsize' => $matches[ 1 ], 11 'max_postsize' => ini_get( 'post_max_size' ) 12 ) ); 13 exit; 14 } 4 15 5 16 /* This single file is used to increase upload_max_filesize and post_max_size using .htaccess*/ … … 86 97 if( $path != '/' ) 87 98 { 99 $return = array( ); 88 100 for( $i = 0; $i != $show_upload_boxes; $i++) 89 101 { 90 if ( $_FILES['upload_file']['size'][$i] > ($upload_max_size*1024*1024) ) 102 if ( $_FILES['upload_file']['error'][$i] !== 0 ) 103 { 104 $return[] = array( 105 "file" => $_FILES['upload_file']['name'][$i] , 106 "filesize" => 'filesize #' . $_FILES['upload_file']['error'][$i] 107 ); 108 continue; 109 } 110 elseif ( $_FILES['upload_file']['size'][$i] > ($upload_max_size*1024*1024) ) 91 111 { 92 112 $return[] = array( … … 219 239 } 220 240 221 error_log(print_r($return, true), 3, "/tmp/log");241 //error_log(print_r($return, true), 3, "/tmp/log"); 222 242 } 223 243
Note: See TracChangeset
for help on using the changeset viewer.