2014-06-14 11:31 阅读 39

xajax Javascript组件无法包含在内

I am Facing the following error while using ajax in codeigniter. I have successfully implemented xajax at client side, it it gives the error on admin side. the admin and client controller are at controllers directory.

The error is Error: the xajax Javascript component could not be included. Perhaps the URL is incorrect? URL: xajax_js/xajax_core.js

please specify the answer.

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享

2条回答 默认 最新

  • 已采纳
    dongxin2734 dongxin2734 2015-04-09 23:00

    I'm assuming that you have a recent version of the Apache2 web server installed, and are not using some other web server. I had exactly this problem and here are my suggestions as they relate to Apache2.

    Make sure that you have a proper alias installed for the xajax files in the Apache2 web server. You should have a .conf file in mods-available, symlinked into mods-enabled, with something very similar to the following:

    <IfModule alias_module>
        Alias /xajax/ /var/lib/php5/xajax/
        Alias /xajax_js/ /var/lib/php5/xajax/xajax_js/
        <Directory "/var/lib/php5/xajax">
            Require all granted
            Order deny,allow
            Allow from all

    Substitute the appropriate path to your xajax installation in the above.

    In particular, if you are using Apache 2.4, note that the "Require all granted" directive is now required instead of the "Order" and "Allow" directives which accomplished the same thing in Apache 2.2.

    点赞 评论 复制链接分享
  • duanlun1955 duanlun1955 2018-04-08 14:11

    Be sure you have the javascript URI set if your installation is in another directory. For example, mine is in admin/includes/xajax, so in Xajax 0.6, I had to do

    $xajax->configure('javascript URI', 'includes/xajax/');
    点赞 评论 复制链接分享