DST Posted March 17, 2010 Report Share Posted March 17, 2010 Nu nesen jums te prasiju par to upload skriptu._ atrisinaaju. Bet tagat ir probleema kad augšuplādee failu ir viena liela bile bet kad vina ir saspiesta loti ilgi ladejas visas bildes tapec man vajadzetu lai vins no ta viena izveleta faila augsupladee 2 bildes. Vienu siikattelu un otru full size attelu. kads var paradiit kodaa ka to izdarit?? Rekur mans kods::: if($_GET['go'] == 'pievienot_mebeli') { if($_POST['pievienot_mebeli']) { if ((($_FILES["file"]["type"] == "image/gif") || ($_FILES["file"]["type"] == "image/jpeg") || ($_FILES["file"]["type"] == "image/png") || ($_FILES["file"]["type"] == "image/pjpeg")) && ($_FILES["file"]["size"] < 2000000000000000000000000000000000000000000000000000000000)) { 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 />"; if (file_exists("bildes/" . $_FILES["file"]["name"])) { echo $_FILES["file"]["name"] . " šāds fails jau pastāv. "; } else { move_uploaded_file($_FILES["file"]["tmp_name"], "bildes/" . $_FILES["file"]["name"]); echo "Stored in:<a href=' " . "bildes/" . $_FILES["file"]["name"] . "'> fails </a>"; } } } $veids = quote_smart($_POST['veids']); $bilde = quote_smart("bildes/" .$_FILES["file"]["name"]); $pievienot_mebeli = mysql_query("INSERT INTO katalogs (veids, bilde) VALUES ($veids, $bilde)") or die(mysql_error()); echo 'Mēbele tika veiksmīgi nosūtīta. <br /><br />'; echo '<form method="post" enctype="multipart/form-data"> <table> <tr> <td valign="middle">Kateogrija<br></td> <td valign="bottom"> <select name="veids" > <option value="v_mebeles">Virtuvei</option> <option value="vi_mebeles">Viesistabai</option> <option value="guļamistabai">Guļamistabai</option> <option value="durvis">Durvis</option> <option value="kapnes">Kapnes</option> <option value="veikaliem_un_bāriem">veikaliem un bāriem</option> <option value="un_kas_cits">Un kas cits</option> </select> </tr> <tr><td>Bilde:</td><td><input type="file" name="file" id="file" /></td></tr> <tr><td></td><td><input type="submit" name="pievienot_mebeli" /></td></tr> </table> </form>'; } else { echo ' <form method="post" enctype="multipart/form-data"> <table> <tr> <td valign="middle">Kateogrija<br></td> <td valign="bottom"> <select name="veids" > <option value="v_mebeles">Virtuvei</option> <option value="vi_mebeles">Viesistabai</option> <option value="guļamistabai">Guļamistabai</option> <option value="durvis">Durvis</option> <option value="kapnes">Kapnes</option> <option value="veikaliem_un_bāriem">veikaliem un bāriem</option> <option value="un_kas_cits">Un kas cits</option> </select> </tr> <tr><td>Bilde:</td><td><input type="file" name="file" id="file" /></td></tr> <tr><td></td><td><input type="submit" name="pievienot_mebeli" /></td></tr> </table> </form>'; } gribeetu veel lai augšuplade velvienu bili. Karo4 viena bilde bet lai ielade divas mapes. Viena glabajas mape sikatteli otra bildes viss kip pec pirma principa bet tikai lai tas bildes otras samazinaas - siikateli Lab ceru ka saprataat ja nee sakat, Link to comment Share on other sites More sharing options...
DoubleT Posted March 19, 2010 Report Share Posted March 19, 2010 tur kur pārbauda utt. ieliec image resize skriptu un uzliec vēl vienu move ( tam mērogotajam ) uz sīkattēlu mapi spied maigi Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now