miniaturka.php
<?php { $strUploadDir = './' . $_FILES['file']['name']; $width= \"100\"; $height = \"100\"; $obrazek_min = \"a1.jpg\"; $nazwa_miniaturki = min_'.$_FILES[file][name]; $obrazek_min = ImageCreate($width, $height); $obrazek_max = ImageCreateFromJPEG(\"$obrazek\"); $obrazek_max_w = ImageSX($obrazek_max); $obrazek_max_h = ImageSY($obrazek_max); ImageCopyResized($obrazek_min, $obrazek_max, 0, 0, 0, 0, $width, $height, $obrazek_max_w, $o
b azek_max_h); ImageJPEG($obrazek_min); Header('COntent-type: image/jpeg'); ImageJPEG($obrazek_min, $nazwa_miniaturki); echo 'Plik został pomyślnie uploadowany! <br />; } }; ?>
a kodu do wysłania
index.html
Kod
<form method="POST" enctype="multipart/form-data" action="miniaturka.php">
<!-- pole "Przeglądaj" -->
<input type="file" name="file" size="40"><br>
<!-- pole "Przeglądaj" -->
<input type="submit" value="Uploaduj"><input type="reset" value="Reset"></p>
</form>
<!-- pole "Przeglądaj" -->
<input type="file" name="file" size="40"><br>
<!-- pole "Przeglądaj" -->
<input type="submit" value="Uploaduj"><input type="reset" value="Reset"></p>
</form>
licze na różne modyfikacje