2011-08-10 49 views
1

我有問題,因爲我的MooTools AJAX請求沒有找到我的PHP腳本URL請求。首先我有一個index.php加載ControllerList.php(列出文件並刪除每一個),然後在該腳本中,我有用於調用controllerDelete的這個MooTools腳本。MooTools請求url返回404錯誤頁面

有問題,因爲它說:

404: The requested URL /Files/ControladorDelete.php was not found on this server. 

這是我的項目的結構:

http://imageshack.us/photo/my-images/717/imagen1nvj.png/

這是我的MooTools的腳本:

window.addEvent('domready', function() { 

    $$('a.div').addEvent('click', function(e) { 

    e.stop(); 
    var id_file = this.get('id'); 
    var new = id_file.split('#'); 

    var DeleteFile = new Request({ 
     method: 'POST', 
     url: 'ControllerDelete.php?id_file='+new[1]+'&name='+new[0], ERROR 
     onRequest: function() {}, 
     onSuccess: function() { 
     }, 
     onFailure: function(){alert('Error!');} 
    }).send(); 

    }); 
}); 

請求不斷給我錯誤。感謝您的幫助

我已經更改爲URL:控制器/ ControllerDelete.php但它是相同的,我不知道如何解決它。在您的文件夾樹

回答

0

一個眼神告訴我,你需要形成你的URL是這樣的:

url: 'Source%20Files/Controller/ControllerDelete.php?id_file='+new[1]+'&name='+new[0], 

要改正錯誤。