PHP不显示任何错误消息。例如:php中没有错误消息
<?php
require 'connect.php';
if(isset($_GET['last_name'] ,$_GET['first_name'])){
$last_name = trim($_GET['last_name']);
$first_name = trim($_GET['first_name']);
$people = $db->prepare("SELECT first_name, last_name FROM people
WHERE last_name=?");
$people = $db->bind_param('s',$last_name);//s for data type string
$people->execute();
$people->bind_results($first_name,$last_name);
while($people->fetch()){
echo $first_name. ' '.$last_name.'<br>';
}
echo $first_name;
}
?>
这个程序有错误bind_results应该bind_result,由于某种原因,它不显示我的PHP错误。 我也有试过如下:error_reporting(E_ALL);
,并在php.ini的display_errors的是
你使用正确的php.ini吗?在某些发行版和版本中,有一个用于命令行,另一个用于apache。添加“ini_set('display_errors','1');”找出 –
添加ini_set('display_errors','1')没有帮助@ElvisCiotti –