smarty Posted July 21, 2005 Report Share Posted July 21, 2005 Kaa buutu iespeejams panaakt, ka vienaa lapaa upload formai ir max lielums, piem, 2MB bet citaa ir 50mb. Jaanjem veeraa, ka lapu url neatbilst reaalajiem celjiem uz servera. Link to comment Share on other sites More sharing options...
bubu Posted July 21, 2005 Report Share Posted July 21, 2005 Viens, kas nāk prātā (iz http://lv.php.net/manual/en/features.file-upload.php ): <!-- The data encoding type, enctype, MUST be specified as below --> <form enctype="multipart/form-data" action="__URL__" method="POST"> <!-- MAX_FILE_SIZE must precede the file input field --> <input type="hidden" name="MAX_FILE_SIZE" value="30000" /> ... </form> The __URL__ in the above example should be replaced, and point to a PHP file. The MAX_FILE_SIZE hidden field (measured in bytes) must precede the file input field, and its value is the maximum filesize accepted. Protams, uz to nevar paļauties.. Bet nu varbūt der :) Link to comment Share on other sites More sharing options...
Venom Posted July 21, 2005 Report Share Posted July 21, 2005 ini_set('upload_max_size') (tik jāpielāgo arī visādi post_max, max_ram utt) + $_FILES['input_name']['size']/filesize($_FILES['input_name']['tmp_name']) čekošana jau servergalā Link to comment Share on other sites More sharing options...
smarty Posted July 21, 2005 Author Report Share Posted July 21, 2005 nu taa klienta puses paarbaude iisti neder. tas ar to ini_set .. vismaz man eksperimenteejot to nenjeema pretii, spiitiigi njem php.ini veertiibu <_< nu paproveeshu arii citas veertiibas Link to comment Share on other sites More sharing options...
PheliX Posted July 21, 2005 Report Share Posted July 21, 2005 ini_set() neder, jo skripts tiek izpildiits tikai kad fails jau uploadots. Vieniigais ko es varu izdomaat - ljaut uploadot lielus failus un ar skriptu vienkaarshi saglabaat vai arii nesaglabaat atkariibaa no izmeera... Link to comment Share on other sites More sharing options...
Venom Posted July 21, 2005 Report Share Posted July 21, 2005 nu par ini_set - var arī ar mod_rewrite dažādiem izsaukumiem likt citādu php_value max_upload_size ar .htaccess, bet vieglāk jau uzlikt tieši 50 mb un čekot jau uploadoto, kau arī klienta galu nevajag noniecināt - kādu procentu no liekiem 60-mb uploadiem jau atsēs, tikuntā mazāk noslodzes Link to comment Share on other sites More sharing options...
Klez Posted July 22, 2005 Report Share Posted July 22, 2005 (edited) ieksh php.ini ieliekam max upload size cik vaig lielāko un attieciigi , kur ir atljauts 2mb tur paarbaudaam if ($_FILES['fails']['size'] > 2097152 /* 2 MB*/) echo "Fails ir par lielu!"; else{ //daraam kas jaadara } un kur ir 50 MB tur if ($_FILES['fails']['size'] > 52428800/* 50 MB*/) echo "Fails ir par lielu!"; else{ //daraam kas jaadara } Edited July 22, 2005 by Klez Link to comment Share on other sites More sharing options...
Jancis Posted March 27, 2006 Report Share Posted March 27, 2006 ini_set() neder, jo skripts tiek izpildiits tikai kad fails jau uploadots. Vieniigais ko es varu izdomaat - ljaut uploadot lielus failus un ar skriptu vienkaarshi saglabaat vai arii nesaglabaat atkariibaa no izmeera... neljauj uploadot lielus failus! - <input type="hidden" name="MAX_FILE_SIZE" value="30000" /> protams jautaajums ir nenormaali vecs.. Link to comment Share on other sites More sharing options...
Grey_Wolf Posted March 28, 2006 Report Share Posted March 28, 2006 Jancis--> nu bet logjiski ... <input type="hidden" name="MAX_FILE_SIZE" value="30000" /> shajaa gadijumaa tu ljau upladot nepilnus 30Kb ko tad briinies? tas skaitlis norada maksimaalo faila lielumu Baitos nevis kilabaitos vai Megabaitos 2097152 - buus ~2Mb --> saskaiti ciparinjus un padomaa... ;) Link to comment Share on other sites More sharing options...
Jancis Posted May 5, 2006 Report Share Posted May 5, 2006 cat .htaccess php_value upload_max_size 50M php_value post_max_size 50M Link to comment Share on other sites More sharing options...
Recommended Posts