doudiewen9435 2014-06-14 11:31
浏览 46
已采纳

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 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
        </Directory>
    </IfModule>
    

    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.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?