tikkai maacos Posted August 28, 2008 Report Share Posted August 28, 2008 Sveiki... meeginu uploadot video virs 30mb mazinjie uloadojas lielie nea ieksh .htaccess ir shaadas veertiibas! php_value max_execution_time 3600 php_value post_max_size 55M php_value max_input_time 3600 php_value upload_max_filesize 55M pats kods ir shaads <form action="" method="post" enctype="multipart/form-data"> <label for="file">Filename:</label><input type="file" name="file" id="file" /><br /> <input type="hidden" name="ok" value="ok" /> <input type="hidden" name="MAX_FILE_SIZE" value="419430400" /> <input type="submit" name="submit" value="Submit" /> </form> <?php if ($_POST['ok']){ ini_set('max_execution_time', '3600'); if (($_FILES["file"]["type"] == "video/avi") || ($_FILES["file"]["type"] == "video/mpeg")){ if ($_FILES["file"]["size"] < 419430400){ { // if ($_FILES["file"]["error"] > 0) { echo "Return Code: " . $_FILES["file"]["error"] . "<br />"; } else { echo "Upload: " . $_FILES["file"]["name"] . "<br />"; echo "Type: " . $_FILES["file"]["type"] . "<br />"; echo "Size: " . ($_FILES["file"]["size"] / 1024) . " Kb<br />"; echo "Temp file: " . $_FILES["file"]["tmp_name"] . "<br />"; if (file_exists("upload/" . $_FILES["file"]["name"])) { echo $_FILES["file"]["name"] . " already exists. "; } else { move_uploaded_file($_FILES["file"]["tmp_name"], "upload/" . $_FILES["file"]["name"]); echo "Stored in: " . "upload/" . $_FILES["file"]["name"]; } } } } else{echo "Video ir pa lielu! Maksimālais izmērs ir 50MB";} } else { echo "Neparizs fails atljautie faili ir *.avi un *.mpeg";} ?> un joks taads ka nav nekādu erroru! P.S. hostings = nano.lv Paldiess! Link to comment Share on other sites More sharing options...
Aleksejs Posted August 28, 2008 Report Share Posted August 28, 2008 Iespējams, ka uz nano.lv aizliegts mainīt maksimālo faila izmēru caur .htaccess ... Link to comment Share on other sites More sharing options...
cucumber Posted August 28, 2008 Report Share Posted August 28, 2008 Pamegini pec shitas rindas izvadit, ko satur failu masivs, apskaties kads kludas tips ir pie error, jo varbut kaut kas nav ar tiem failiem ko megini uzlikt tips nesakrit un tik talu, pat kods neizpildas. if ($_FILES["file"]["size"] < 419430400){ print_r($_FILES); Link to comment Share on other sites More sharing options...
tikkai maacos Posted August 28, 2008 Author Report Share Posted August 28, 2008 (edited) Iespējams, ka uz nano.lv aizliegts mainīt maksimālo faila izmēru caur .htaccess ... uz nano serveriem staav webi ar video upload... neticu ka vinji liek mazus video! Directive Local Value Master Value max_execution_time 3600 40 max_input_nesting_level 64 64 max_input_time 3600 60 memory_limit 150M 150M post_max_size 55M 8M Pamegini pec shitas rindas izvadit, ko satur failu masivs, apskaties kads kludas tips ir pie error, jo varbut kaut kas nav ar tiem failiem ko megini uzlikt tips nesakrit un tik talu, pat kods neizpildas. CODE if ($_FILES["file"]["size"] < 419430400){ print_r($_FILES); Nekas neparaadas... tikkai atkal pievienoshanas forma no jauna! Edited August 28, 2008 by tikkai maacos Link to comment Share on other sites More sharing options...
cucumber Posted August 28, 2008 Report Share Posted August 28, 2008 (edited) Tad ir vaina tipos, if'i neizpildas vai posts, ko nosuti. Varbut nomaini if ( isset($_POST['ok']) ), pamegini pirms shita print_r($_FILES) if ($_POST['ok']){ ini_set('max_execution_time', '3600'); if (($_FILES["file"]["type"] == "video/avi") || ($_FILES["file"]["type"] == "video/mpeg")){ if ($_FILES["file"]["size"] < 419430400){ Edited August 28, 2008 by cucumber Link to comment Share on other sites More sharing options...
tikkai maacos Posted August 28, 2008 Author Report Share Posted August 28, 2008 Tad ir vaina tipos, if'i neizpildas vai posts, ko nosuti. Varbut nomaini if ( isset($_POST['ok']) ), pamegini pirms shita print_r($_FILES) if ($_POST['ok']){ ini_set('max_execution_time', '3600'); if (($_FILES["file"]["type"] == "video/avi") || ($_FILES["file"]["type"] == "video/mpeg")){ if ($_FILES["file"]["size"] < 419430400){ ja ir nepareizs tips tad vinsh taa ari pasaka.... tavs ieteiktais variants arii nesanaaca.... formu atstaaju ieksh viena faila un php ieksh otra... un taapat nekaa.... balta bilde un viss..... varbuut ir veel kaads ieteikums.... google.lv saka ka vajag visu ko mainiit ieksh .htaccess un mainiiju bet nekaa.... Link to comment Share on other sites More sharing options...
cucumber Posted August 28, 2008 Report Share Posted August 28, 2008 Tad pamegini izmainit ar ini_set(); upload lielumu un iesledz error reporting ieksha. Link to comment Share on other sites More sharing options...
tikkai maacos Posted August 28, 2008 Author Report Share Posted August 28, 2008 (edited) Tad pamegini izmainit ar ini_set(); upload lielumu un iesledz error reporting ieksha. ir iesleegts.... nekas.. pilniiigi nekas.... sha zvaniishos un lamaashos :D laikam nav lemts.... EDIT: Labs ir.... sleedzam ciet... pie visa vainiigs nano.lv vinji var tikkai reguleet upload lielumus! paldies par atsauciibu... :) Edited August 28, 2008 by tikkai maacos Link to comment Share on other sites More sharing options...
Paulinjsh Posted August 28, 2008 Report Share Posted August 28, 2008 ar ini_set uload lielumus nav iespējams mainīt un turklāt uploads notiek pirms tiek izsaukts tavs uber php fails, tā kā upload max lielums ir maināms vai nu .htaccess vai php.ini Link to comment Share on other sites More sharing options...
cucumber Posted August 28, 2008 Report Share Posted August 28, 2008 ja, sajaucu ar memory_limit Link to comment Share on other sites More sharing options...
Recommended Posts