title: How to delete file from folder using javascript?
body: <p>Is there any way to delete files from folder using javascript..? Here is my function</p>
  
  <pre><code>function deleteImage(file_name)
      {
          var r = confirm("Are you sure you want to delete this Image?")
          if(r == true)
          {
              var file_path = &lt;?php echo dirname(__FILE__) . '/uploads/'?&gt;+file_name;
              file_path.remove();
          }
      }
  </code></pre>