MārisL Posted August 9, 2007 Report Share Posted August 9, 2007 Lieta tāda, ka lietojot šos kodus ----------------------------------------------------------------------------------------------------------------- <form action="augsuplade_piev.php" method="post" enctype="multipart/form-data"> <input type="hidden" name="MAX_FILE_SIZE" value="100000"> Fails: (max: 2mb) <input type="file" name="userfile"><br> <input type="submit" value="Pievienot"> un <?php if(!(copy($_FILES['userfile']['tmp_name'], "Upload/" . $_FILES['userfile']['name']))) die("Failu nav iespējams pievienot!"); echo "<br>Pievienošana pabeigta!<br><br>"; ?> ----------------------------------------------------------------------------------------------------------------- Viņš atļauj tikai uplaod teksta failus (txt, html, php, etc.) Kāds nevarētu zināt, kas par lietu? Link to comment Share on other sites More sharing options...
andrisp Posted August 9, 2007 Report Share Posted August 9, 2007 Tāpēc, ka tie pārējie faili visticamāk ir lielāki par 100000 baitiem jeb 100Kb ? Link to comment Share on other sites More sharing options...
MārisL Posted August 9, 2007 Author Report Share Posted August 9, 2007 Slēdzat ciet! Link to comment Share on other sites More sharing options...
tmpjail Posted August 10, 2007 Report Share Posted August 10, 2007 piezīme: copy aizstāj ar move_uploaded_file ;) Link to comment Share on other sites More sharing options...
Recommended Posts