显示所有错误和警告
更新2:
<?php error_reporting( E_ALL ); ?>
显示误差=ON
错误报告=E_ALL\E_严格
更新1:
错误报告=E_ALL&~E_不推荐
错误报告=E_ALL\E_严格
/etc/init.d/apache2重新启动
原题:
<?php error_reporting( E_ALL );?><html> <head> <title></title> <link rel="icon" type="image/png" href="favicon.ico"> <?php if( $_SERVER['REQUEST_METHOD']=='POST' ) { $err = array(); if( empty( $_POST['display_name'] ) ) $err[] = "display name field is required"; if( empty( $_POST['email'] ) ) $err[] = "email field is required"; if( empty( $_POST['password'] ) ) $err[] = "password field is required"; if( !$err ) { try { $DBH = new PDO( "mysql:host=localhost;dbname=database1", "user", "pass" ); $DBH -> setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION ); $STH = $DBH -> prepare( "delete into table1 (display_name, email, password) values ( :display_name, :email, :password )" ); $STH -> bindParam( ':display_name', $_POST['display_name'], PDO::PARAM_STR, 100 ); $STH -> bindParam( ':email', $_POST['email'], PDO::PARAM_STR, 100 ); $STH -> bindParam( ':password', $_POST['password'], PDO::PARAM_STR, 100 ); $STH -> execute(); $STH = $DBH -> prepare( "delete into table2 ( username, status, users_id ) values ( :username, :status, :users_id )" ); $strStatus = 1
紫衣仙女
婷婷同学_