如何保留 PHP 5.5 但使用 5.4(不推荐使用 CodeIgniter) [英] How to keep PHP 5.5 but use 5.4 (CodeIgniter deprecated)

查看:50
本文介绍了如何保留 PHP 5.5 但使用 5.4(不推荐使用 CodeIgniter)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个运行 ISPConfig 3 的专用服务器.它属于 Debian 7(官方 PHP 5.4).我已将其升级到 PHP 5.5.

I have a dedicated server running with ISPConfig 3. It came under Debian 7 (officially PHP 5.4). I have upgraded it to PHP 5.5.

但是,我没有意识到CodeIgniter需要mysql驱动才能运行......因此,我的网站不再工作了.

However, I didn't realize that CodeIgniter needs the mysql driver to run... Therefore, my website doesn't work anymore.

所以要么我找到一种仅在网站上使用 PHP 5.4 的方法(而不影响在 PHP 5.5 下运行的其他人),要么我找到一种方法来升级"CodeIgniter,使其不再使用已弃用的 mysql 扩展.

So either I find a way to use PHP 5.4 only on a website (without affecting the others running under PHP 5.5) or I find a way to "upgrade" CodeIgniter so it doesn't use the deprecated mysql extension anymore.

推荐答案

相信你可以对config/database.php

改变

$db['default']['dbdriver'] = "mysql";

到:

$db['default']['dbdriver'] = "mysqli";

由于 CI 使用数据库抽象层,这应该是透明的.

As CI uses a database abstraction layer, this should be transarent.

这篇关于如何保留 PHP 5.5 但使用 5.4(不推荐使用 CodeIgniter)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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