我可以在CodeIgniter中使用MySQLi和PHP5语法吗? [英] Can I Use MySQLi and PHP5 Syntax Within CodeIgniter?
问题描述
我开始一个新的web项目,我想我会尝试使用一个框架。我知道CodeIgniter在PHP4中编码,但是我能够使用MySQL的MySQLi函数,以及PHP5语法(当它涉及到OO特别),而与CodeIgniter编码?我应该使用Kohana吗?
Im starting a new web project, and I figured I'd try using a framework. I know CodeIgniter is coded in PHP4, but will I be able to use the MySQLi functions of MySQL, as well as PHP5 syntax (when it comes to OO especially) while coding with CodeIgniter? Should I use Kohana instead?
推荐答案
是的。您可以使用运行的PHP版本中的任何功能。
Yes. You can use whatever features in the version of PHP that you are running. Codeigniter runs fine on PHP5.
此外,Codeigniter包含一个用于mysqli的数据库驱动程序,可以在system / application / config / database.php中设置:
Also, Codeigniter includes a database driver for mysqli which can be set in system/application/config/database.php as:
$db['default']['dbdriver'] = "mysqli";
这篇关于我可以在CodeIgniter中使用MySQLi和PHP5语法吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!