How to keep PHP 5.5 but use 5.4 (CodeIgniter deprecated)(如何保留 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)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:如何保留 PHP 5.5 但使用 5.4(不推荐使用 CodeIgniter)


基础教程推荐
- 有什么方法可以用编码 UTF-8 而不是 Unicode 返回 PHP`json_encode`? 2021-01-01
- YouTube API v3 点赞视频,但计数器不增加 2022-01-01
- 在PHP中根据W3C规范Unicode 2022-01-01
- 学说 dbal querybuilder 作为准备好的语句 2022-01-01
- Cron Jobs 调用带有变量的 PHP 脚本 2022-01-01
- 如何在 Laravel 中使用 React Router? 2022-01-01
- PHP PDO MySQL 查询 LIKE ->多个关键词 2021-01-01
- PHP 类:全局变量作为类中的属性 2021-01-01
- 如何在 Laravel 5.3 注册中添加动态下拉列表列? 2021-01-01
- 如何替换eregi() 2022-01-01