我试图让Var Dump显示,但我得到的只是一个白色屏幕。有什么建议吗?
<?php
require('includes/config.inc.php');
require(MYSQL);
$aid = FALSE;
if (isset($_GET['aid']) && filter_var($_GET['aid'], FILTER_VALIDATE_INT, array('min_range' => 0))){
$aid = $_GET['aid'];
$q = "SELECT aircraft_id, aircraft_name AS name, aircraft_type AS type, tail_number AS tn FROM aircraft WHERE aircraft_id=$aid";
var_dump($q); die();
}
答案 0 :(得分:1)
除非MYSQL
是脚本中定义的常量,否则此行代码将失败并且脚本执行将立即停止:
require(MYSQL);
中所述
require与include相同,除非失败,它还会产生致命的E_COMPILE_ERROR级别错误。换句话说,它将暂停脚本,而include仅发出警告(E_WARNING),允许脚本继续。