CodeIgniter是否与PHP版本兼容? [英] CodeIgniter compatibility with PHP version?

查看:96
本文介绍了CodeIgniter是否与PHP版本兼容?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在将CodeIgniter 2.2.6和PHP 5.5一起使用,并且工作正常.现在我想将PHP升级到版本5.6.6,我的问题是,CodeIgniter是否与PHP 5.6.6兼容?

I am using CodeIgniter 2.2.6 with PHP 5.5 and it works fine. Now I want to upgrade PHP to version 5.6.6 my question is, is CodeIgniter compatible with PHP 5.6.6?

我无法将CodeIgniter升级到新版本,因为我有许多基于版本2.2.6的模型.

I can't upgrade CodeIgniter to a new version because I have many models based on Version 2.2.6.

推荐答案

Codeigniter 2.2x与PHP7.1 +兼容.

Codeigniter 2.2x IS COMPATIBLE with PHP7.1+.

您只需要记住:

  1. 模型/类等区分大小写,必须从大写字母开始
  2. 与应用程序文件夹中文件的名称相同
  3. mysql存在问题(非常老,现在不使用驱动程序),因此您必须使用mysqli驱动程序(但它已在CI2中实现,请检查是否尚未使用它)
  4. 如果您有会话表,有时则必须截断该表,清除缓存并再次填充它.
  5. 如果遇到问题,请检查third_party文件夹中软件的兼容性-CI对这些问题不承担任何责任.

就我而言,最新版本的Bootstrap& jQuery已安装.但是,我没有使用钩子,高级功能等.

In my case everything is working smoothly with the newest version of bootstrap & jQuery installed. However, I'm not using hooks, advanced functions and so on.

注意,在大多数情况下,您可以使用.htaccess和AddHandler命令强制服务器使用较早的php版本:

NOTE, that in most cases you can force server to use older php version using .htaccess and AddHandler command:

AddHandler application/x-httpd-php56 .php

这是PHP7之前的PHP的最新版本.

This is last version of PHP before PHP7.

最后但并非最不重要-当然,我不建议您使用此非常老版本的CI,但是就我个人而言,从CI2x迁移到CI2x是毫无意义的CI3,最好在2018年等待CI4然后迁移.

And last but not least - of course I don't recommend to use this very old version of CI, however in my opinions - in my cases - there is no sense to migrate from CI2x to CI3, in 2018 it is better to wait for CI4 and then migrate.

这篇关于CodeIgniter是否与PHP版本兼容?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆