delete file from folder o click of button using php
<p>when we run below code its not working. unlink function show file name but not delete that file from folder</p>

<pre><code>&lt;?php
         $files = scandir("db-backup", 1);
         $path = "settings/db-backup/";
         echo '&lt;table&gt;';
         foreach ($files as $key =&gt; $value) 
         {
             if($value!='..' &amp;&amp; $value!='.')
             {
                 $r =$path.$value;
            echo '&lt;td&gt;'.$value.'&lt;/td&gt;&lt;td&gt;&lt;input type="image" src="../../involve/images/icons/trash.png" value="Delete" onClick= "unlink('.$value.')"&gt;&lt;/td&gt;&lt;/tr&gt;';
             }

         }
         echo '&lt;/table&gt;';
        ?&gt;   
</code></pre>

<p>onclick of button it call unlink fuction it show unlink(filename) but not delete the file from folder</p>
