4
的Red Hat Linux服务器,Apache 2.2的,PHP 5.5.4PHP在命令行mysqli的工作,但不能在页面
当我在命令行中运行它,一切似乎是罚款:
php -r '$mysqli = new mysqli("127.0.0.1", "un", "pw", "things", "3306");'
同时,我有一个不运行的.php文件。我从这个代码得到这个错误...
PHP Fatal error: Class 'mysqli' not found in [/path/to]/vars.php on line 2
:
<?php
$mysqli = new mysqli("localhost", "un", "pw", "things", "3306");
?>
其他.PHP页面(不使用的mysqli)做工精细。任何想法这里发生了什么?提前致谢。
你应该在你的配置文件中加载扩展名。 –
看看这个:http://stackoverflow.com/questions/666811/fatal-error-class-mysqli-not-found – immulatin
Lajos:我在哪里可以找到配置文件? –