【问题标题】:Mysqli_init stops the script execution unexpectedMysqli_init 意外停止脚本执行
【发布时间】:2014-05-11 01:59:08
【问题描述】:

我有一个 php5 脚本,它运行良好,在这行之前:

echo "Hello world...";
$mysqli = mysqli_init();
echo "Mysql is ready...";

输出是:Hello world...

我没有收到任何错误,任何消息,只是脚本执行意外停止。 我将 Ubuntu 与 PHP5 和 Apache2 以及 Mysql 5.5 一起使用

谢谢。

【问题讨论】:

  • 如果它没有输出就死了,那么你已经关闭了 error_reporting 和 display_errors。在开发/测试时,它们不应该放在首位。

标签: php mysql apache mysqli


【解决方案1】:
ini_set('display_errors', true );
error_reporting( E_ALL & ~E_NOTICE );

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2011-07-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-01-01
    • 1970-01-01
    相关资源
    最近更新 更多