How to delete file from folder using javascript?

前端 未结 6 1011
故里飘歌
故里飘歌 2020-12-16 00:51

Is there any way to delete files from folder using javascript..? Here is my function

function deleteImage(file_name)
    {
        var r = confirm(\"Are you          


        
6条回答
  •  暖寄归人
    2020-12-16 01:09

    You cannot do it by using javascript. But if the file resides in the server then you can use php to do that..you can use unlink in php.

    unlink($path_to_file);
    

提交回复
热议问题