<?php if ($_POST["xe"] == "ee") { $img_ori = imagecreatefromjpeg ($_FILES["xe"]["tmp_name"]);//-------- Carrega img original $tmp_img = imagecreatetruecolor(200, 200); imagejpeg( $tmp_img, "sbimg/", 50 ); } ?> <form method="post" action="envia.php" enctype="multipart/form-data"> <input type="file" name="x" /> <input type="submit" name="xe" value="ee" /> </form>
Mas quando vou testá-lo dá o seguinte erro:
Warning: imagejpeg() [function.imagejpeg]: Unable to open 'sbimg/' for writing in /home/restricted/home/xer/public_html/cepragaleria/envia.php on line 6
Já marquei todas as caixinhas na opção de FTP mas não dá!