CodeIgniter 2.X 于 PHP5.6 兼容错误
生活随笔
收集整理的這篇文章主要介紹了
CodeIgniter 2.X 于 PHP5.6 兼容错误
小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
本篇文章由:http://xinpure.com/codeigniter-2-x-to-php5-6-compatible-error/
CI 3.0 已兼容此問題
在代碼遷移的過程中,遇到了一個(gè) PHP 版本兼容錯(cuò)誤
A PHP Error was encounteredSeverity: NoticeMessage: Only variable references should be returned by referenceFilename: core/Common.phpLine Number: 257原服務(wù)器 PHP 版本為 5.4,新服務(wù)器 PHP 版本為 5.6, Codeigniter 版本 2.1.3
解決方法網(wǎng)上比較多,在這記錄下,做個(gè)筆記。
主要原因: 此錯(cuò)誤主要出現(xiàn)在 Codeigniter 2.x 使用 PHP 5.6 以上的版本
解決方法:
降級(jí) PHP 版本到 5.5 以下
修改 /system/core/Common.php 第257行代碼
將:
return $_config[0] =& $config;改成:
$_config[0] =& $config; return $_config[0];轉(zhuǎn)載于:https://www.cnblogs.com/xinpureZhu/p/4765908.html
總結(jié)
以上是生活随笔為你收集整理的CodeIgniter 2.X 于 PHP5.6 兼容错误的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 代还信用卡10000多少钱?手续费怎么收
- 下一篇: 动态规划算法php,php算法学习之动态