Php jquery文件下载插件不';行不通

Php jquery文件下载插件不';行不通,php,jquery,cookies,Php,Jquery,Cookies,我用它来下载文件,或者至少我试着下载,但它不起作用 我将提到的cookie放在index.php的顶部位置,如下所示: header('Set-Cookie: fileDownload=true; path=/'); $('.js--download').on('click', function(){ var target = $(this).attr('href'); $.fileDownload(target) .done(function () { alert('

我用它来下载文件,或者至少我试着下载,但它不起作用

我将提到的cookie放在index.php的顶部位置,如下所示:

header('Set-Cookie: fileDownload=true; path=/');
$('.js--download').on('click', function(){
    var target = $(this).attr('href');
    $.fileDownload(target)
    .done(function () { alert('File download a success!'); })
    .fail(function () { alert('File download failed!'); });
    return false; //this is critical to stop the click event which will trigger a normal file download!
});
cookie已设置,我可以在站点信息中看到这一点。 我在当前站点上的js代码如下所示:

header('Set-Cookie: fileDownload=true; path=/');
$('.js--download').on('click', function(){
    var target = $(this).attr('href');
    $.fileDownload(target)
    .done(function () { alert('File download a success!'); })
    .fail(function () { alert('File download failed!'); });
    return false; //this is critical to stop the click event which will trigger a normal file download!
});
问题是启动了.done功能,但下载没有启动。我还想知道为什么我现在可以在我的浏览器检查工具中看到网络发送的请求。当它真的是一个ajax调用时,我应该在那里看到它

有人有主意吗