I have a form to upload jpegs into an "imagens" folder and some related comments into a database, wich works fine in my machine. When I uploaded it to my ISP though, it sent back this message:
Warning: Unable to create '../imagens/testing.jpg': Permission denied in /hsphere/local/home/etc/index.php
Warning: Unable to move '/tmp/phpSIQiGh' to '../imagens/testing.jpg' in /hsphere/local/home/etc/index.php
Any help? The code follows:
<?php
if ($submit == "Pronto")
{ chmod ($userfile, 0777);
if (move_uploaded_file ($userfile, "imagens/$userfile_name"))
{
$src_img = imagecreatefromjpeg("$userfile_name");
$new_w = 100;
$new_h = imagesy($src_img) / (imagesx($src_img) / 100);
$dst_img = imagecreatetruecolor($new_w,$new_h);
imagecopyresized($dst_img,$src_img,0,0,0,0,$new_w,$new_h,imagesx($src_img),imagesy($src_img));
imagejpeg($dst_img, "$userfile_name");
mysql_query("INSERT INTO gallery (id, titu, nome, coment) VALUES ('', '$titulo', '$userfile_name', '$texto')");
print "ok";
}
else print "Erro<br>";
}
?>[/COLOR]
thanks in advance,
helil