如何在下载后立即删除服务器中的Excel工作表内容?

I am able to download the excel sheet with its content. Kindly let me know how to remove excel sheet contents as soon as it got downloaded.

function(){
    $.ajax({
        /* url : baseURL+'Welcome/downloadornot',
        type : 'POST',
        data : formData,
        //async : false,
        cache : false,
        contentType : false,
        processData : false,*/
        success : function(isConfirm) {
            // var result = JSON.parse(response);
            //function(isConfirm){
            if (isConfirm) {
                window.location.href = "<?php echo base_url() . 'system/file-' . $a . "_" . $b . date('y-m-d') . '.csv'?>";
            }
            function() {
                <?php unlink('system/file-'.$a."_".$b.date('y-m-d').'.csv');?>
            }
            }
        }
    });
});
Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问
相关内容推荐