<?php
$conn = @mysql_connect("localhost","username","password");
echo "出错了,错误原因是:".$php_errormsg;
?>
返回
Notice: Undefined variable: php_errormsg in /54/885/4Rqx/index.php on line 3出错了,错误原因是:
代码前,加上一行:ini_set('track_errors', 1);