简体   繁体   English

CodeIgniter 3.1.0到3.1.2升级失败

[英]CodeIgniter 3.1.0 to 3.1.2 upgrade miserable fail

I have an application that has CodeIgniter version 3.1.0 and I am trying to "upgrade" to 3.1.2 (latest version) 我有一个具有CodeIgniter版本3.1.0的应用程序,我试图“升级”到3.1.2(最新版本)

I have no custom files in the System folder. 我的系统文件夹中没有自定义文件。 I had renamed the system folder (for security reasons) and that change is in my index.php As soon as I switch on the old system folder, application works just fine. 我已经重命名了系统文件夹(出于安全原因),并且此更改已在我的index.php中。一旦打开旧的系统文件夹,应用程序就可以正常工作了。

The error that I get is: 我得到的错误是:

PHP Parse error:  syntax error, unexpected T_CONST in C:\\prj\\www\\nbo\\systemXXYYZZ\\core\\CodeIgniter.php on line 58

Line 58 of the CodeIgniter.php is: CodeIgniter.php的58行是:

LINE 37:defined('BASEPATH') OR exit('No direct script access allowed');
/* COMMENTS IN BETWEEN */         
LINE 58: const CI_VERSION = '3.1.2';

My php version is 5.2.4, apache version is 2.2.6 我的PHP版本是5.2.4,Apache版本是2.2.6

const won't work on php version 5.2.x. const在php版本5.2.x上不起作用。

The latest version of codeigniter is supported only on php 5.3.7+ , so I highly advice you to upgrade your PHP version. 最新版本的codeigniter仅在php 5.3.7+上受支持 ,因此我强烈建议您升级PHP版本。

You could downgrade your project to codeigniter 3.0.5, which is the last version that supports php 5.2.x, but it's not recommended. 您可以将项目降级到codeigniter 3.0.5,这是支持php 5.2.x的最新版本,但不建议这样做。

CodeIgniter 3.1.x recommends PHP 5.6+ and requires at the very least PHP 5.3.7. CodeIgniter 3.1.x建议使用PHP 5.6+, 至少需要PHP 5.3.7。

Removal of PHP 5.2 support (which nobody should need today) is prominently mentioned in the upgrade instructions . 升级说明中突出提到了删除PHP 5.2支持(今天没有人需要)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM