EdgarsK Posted March 7, 2010 Report Share Posted March 7, 2010 1. <form ...> <input type="file" name="fname"> </form> 2. <? if($_FILES['fname']){ ... save ... } Joks tagad ir šeit. ja tiek augšielādēts "Image.jpg" viss ir čiki, "Data.txt" viss ir čiki, bet tiklīdz augšielādēju "MyVid.mp4" vairs galīgi nav čiki, jo $_FILES masīvs ir tukšs un fails neparādās :/ pat nav timeout starp upload lidz gala php skriptam, vnk uzspied submit un pa tiešo, itkā nebūtu bijis upload. Esmu nedaudz izmisis, jo nesaprotu kas par problēmu. Link to comment Share on other sites More sharing options...
Klez Posted March 7, 2010 Report Share Posted March 7, 2010 http://lv.php.net/manual/en/features.file-upload.php un tad izlasi šo http://lv.php.net/manual/en/features.file-upload.errors.php $_FILES['fname']['error'] - tas buus cipars , visticamāk 1 Value: 1; The uploaded file exceeds the upload_max_filesize directive in php.ini. Link to comment Share on other sites More sharing options...
EdgarsK Posted March 7, 2010 Author Report Share Posted March 7, 2010 vid.mp4 -------------------- print_r($_FILES); = array(); img.jpg -------------------- print_r($_FILES); = arraY('tmp_name'=>...,'name'=>... ...); paskaidroju, ka upload notiek visiem iznjemot video faila formatiem, kapec ta notiek? Link to comment Share on other sites More sharing options...
2easy Posted March 7, 2010 Report Share Posted March 7, 2010 (edited) uzliec lielāku post_max_size droši vien ir defaultie 8M, bet tam mp4 ir vairāk. tad ir tāds prikols, ka vsp nekāda infa neaiziet līdz $_FILES php dev teamam vajadzētu padomāt, kā labāk reportēt šādu situāciju, taču pagaidām kā ir tā ir... btw, pirmo reizi failus uploado? ;) (sry, niezēja mēle paprasīt :D:D:D) Edited March 7, 2010 by 2easy Link to comment Share on other sites More sharing options...
EdgarsK Posted March 7, 2010 Author Report Share Posted March 7, 2010 2easy :) tu nelasi ko es saku ? nospiezot upload pogau nenotiek nekads progress, uploads etc.. uzreiz atveras gala lapa, kura ir Array() tuksums, ja fails butu parak liels tad notiktu uploads, kas ievilktos lidz 5sek +- un tad gala butu errors par max_size, paldies ka doma ka uploadoju 1st time ;) Link to comment Share on other sites More sharing options...
EdgarsK Posted March 7, 2010 Author Report Share Posted March 7, 2010 (edited) un tagad kas ir interesanti fails kuram butu jabut $_FILES['ffile'] ir $_POST['ffile'] divaini :/ jo ir enctype uzlikts <form method="post" ecntype="multipart/form-data" action="/op/vupload"> <table border="0" width="100%"> <tr> <td width="80">Video ielāde:</td> <td><input type="file" name="opvidupload" id="opvidupload" onchange="$('#loading').fadeIn();$(this).parent().parent().parent().parent().parent().submit();"></td> </tr> </table> </form> uploaded: photo-3881.png print_r($_POST); Array ( ) print_r($_FILES); Array ( [opvidupload] => Array ( [name] => photo-3881.png [type] => image/png [tmp_name] => /tmp/phpydOmqi [error] => 0 => 19721 ) ) uploaded: vid.mp4 print_r($_POST); Array ( [opvidupload] => '/home/kein/Desktop/vid.mp4' ) print_r($_FILES); Array () ) Edited March 7, 2010 by EdgarsA Link to comment Share on other sites More sharing options...
2easy Posted March 7, 2010 Report Share Posted March 7, 2010 kāda tev ir vērtība? echo ini_get('post_max_size'); Link to comment Share on other sites More sharing options...
EdgarsK Posted March 7, 2010 Author Report Share Posted March 7, 2010 par to es jau esmu parupejies ini_set("post_max_size","1500000"); ini_set("upload_max_filesize","1500000"); Link to comment Share on other sites More sharing options...
EdgarsK Posted March 7, 2010 Author Report Share Posted March 7, 2010 itka neko nedariju tagad vispar .. video tiek uploadots un gala ir Array ( ) Array ( ) Array ( [path] => op/vupload ) <? print_r($_POST); print_r($_FILES); print_r($_REQUEST); ?> Link to comment Share on other sites More sharing options...
EdgarsK Posted March 7, 2010 Author Report Share Posted March 7, 2010 atrisināju pats :/ izpalīdzīgie ... tātad, augsielādējot lielus failus php nemaz neluur uz to tavu ini_set, vins nenjem vinu vera. tapec visas izmainas jabaz htaccess'ā piem :P php_value upload_max_filesize 2000Mphp_value post_max_size 2000M php_value max_execution_time 2000000 php_value max_input_time 2000000 Link to comment Share on other sites More sharing options...
Recommended Posts