MooTools 请求 url 返回 404 错误页面

发布于 2024-11-29 03:58:03 字数 1056 浏览 1 评论 0原文

我遇到了麻烦,因为我的 MooTools AJAX 请求找不到我的 PHP 脚本 URL 请求。首先我有一个index.php,它加载到ControllerList.php(列出文件并删除每个文件),然后在该脚本中,我有这个MooTools脚本用于调用controllerDelete。

存在问题,因为它说:

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:Controler/ControllerDelete.php 但它是相同的,我不知道如何修复它。

I am having trouble because my MooTools AJAX request doesn't find my PHP script URL request. First I have an index.php which loads in ControllerList.php (List files and delete each one), then in that script, I have this MooTools script for calling controllerDelete.

There is the problem because It says:

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

This is the structure of my project:

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

This is my MooTools script:

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();

  });
});

The request keeps giving me error. Thanks for your help

I already changed to URL: Controler/ControllerDelete.php but Its the same and I don't know how to fix it.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

离旧人 2024-12-06 03:58:03

一看你的文件夹树,我就知道你需要像这样形成你的 URL:

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

要修复你的错误。

One look at your folder tree tells me that you need to form your URL like this:

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

To fix your error.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文