hi! i'm trying to upload an image in my site. But the error occur.
Warning: chmod(): Operation not permitted in /www/clanteam.com/i/s/e/isellitem/htdocs/test3.php on line 9
Warning: move_uploaded_file(): Unable to access try/2010 BMW M3 Sedan Front View.jpg in /www/clanteam.com/i/s/e/isellitem/htdocs/test3.php on line 10
php code:
if(isset($_POST['btnsub']))
{
$name=$_FILES['file']['name'];
$dir='try/'.$name;
chmod('try/',0777);
move_uploaded_file($_FILES['file']['tmp_name'],$dir);
echo "successfully uploaded";
}
i'm doing alternative ways to this problem but the same error occur. Me I know what is the problem with my code.
please help me guys.