javascript - 使用 Codeigniter 安装 CJAX - 错误

标签 javascript php ajax codeigniter mod-rewrite

我正在尝试将 CJAX 与 Codeigniter 一起使用。帮助文档真的很困惑,我无法让它们工作。 我已经下载了 CJAX 并将其解压到我的基本根文件夹中,其中包含应用程序和 htaccess 文件。

当我尝试在 View 中执行操作时

/ajax.php?sample/test

我收到以下错误:

Severity: 8192

Message: Non-static method plugin::initiatePlugins() should not be called statically, assuming $this from incompatible context

Filename: classes/core.class.php

有人可以指导我完成安装吗? 我尝试将 core.class.php 中的函数initializePlugins()更改为公共(public)函数initiagePlugins,但无济于事。 我的 htaccess 文件是:

<IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d    
    RewriteRule ^(.*)$ index.php/$1 [L,QSA]
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule  ^/?ajax/(.*)$  ajax.php?$1 [NC,QSA,L]
</IfModule>

我确实需要一些帮助。谢谢。

最佳答案

检查代码,似乎有同名的方法和属性。 在 github source 可以找到

public static $initiatePlugins = array();//line 66

还有调用的方法

function initiatePlugins(){/**/}//line 524

我想说这两个变量混合在一起了。除了你应该在 github 或他的页面上看到的作者之外,无法告诉你更多信息。

关于javascript - 使用 Codeigniter 安装 CJAX - 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29974213/

相关文章:

javascript - 如何清空数组?

jquery 不适用于加载的 html

javascript - 检查日期是否在日期范围之间

javascript - 当前上下文中不存在名称 'content'

javascript - slider 无法正常工作,并且出现 TypeError : jQuery(. ..).easyResponsiveTabs 不是函数

javascript - jQuery AJAX 附加到 Json 返回数据 "d:null"

javascript - 通过 jQuery 更改链接 href

php - fatal error : Class 'ZipArchive' not found while only download as zip from online

php - Android 上的 idHTTP Not Acceptable 错误 406

php - MySQL 使用 Select 填充数组字符串