i code a code such as:

                   $checkbox=isset($_POST['checkbox'])?$_POST['checkbox']:"";
                    $checkbox=(int) $checkbox;
		if ($checkbox!=="")
			{		
			$sql="select * from news where id='$checkbox'"; 
			$result=mysql_query($sql);
			$row=mysql_fetch_assoc($result);
			if ($row['pic_new']!=="")
			{
			if (file_exists('pic_new/'.$row['pic_new'])) 
				{
				unlink('pic_new/'.$row['pic_new']);
				}
			else
				{
				echo "FAIL"
				}
			if (file_exists('pic_thumb/'.$row['pic_new']))
				{
				unlink('pic_thumb/'.$row['pic_new']);

				}
			else
				{
				echo "FAIL";
				}

When delete a row. I will check file in Directory: "Pic_new" and "Pic_thumb".
If have file, it will delete.

But when i click delete, have a error: "Function Unlink😛emission Denied..."

ALthought, i set my directory "pic_new" with "internet account user" have permiss "modify" and the same with "pic_thumb". I still get error:"Function Unlink😛emission Denied..."

Please help me, Thk Mr & Ms

    use the function below to chmod the file to 777.

    chmod();
    

      I don't think you can use chmod() on a Windows Host.... which I'm sure is what he's using by stating he had to give the INTERNET_ACCOUNT_USER permissions. You need to give that account special permissions to delete... modify does not include the delete right.

        [man]chmod/man should work fine on Windows, although I doubt that the process running PHP has permissions to modify permissions of a file if it can't even delete it.

          Write a Reply...