Can I Use MySQLi and PHP5 Syntax Within CodeIgniter?

梦想的初衷 提交于 2019-12-05 02:48:22

问题


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?


回答1:


Yes. You can use whatever features in the version of PHP that you are running. Codeigniter runs fine on PHP5.

Also, Codeigniter includes a database driver for mysqli which can be set in system/application/config/database.php as:

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


来源:https://stackoverflow.com/questions/1522350/can-i-use-mysqli-and-php5-syntax-within-codeigniter

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!