; error_reporting is a bit-field. Or each number up to get desired error reporting level ; E_ALL - All errors and warnings ; E_ERROR - fatal run-time errors ; E_WARNING - run-time warnings (non fatal errors) ; E_PARSE - compile-time parse errors ; E_NOTICE - run-time notices (these are warnings which often result from a bug in ; your code, but it's possible that it was intentional (e.g., using an ; uninitialized variable and relying on the fact it's automatically ; initialized to an empty string) ; E_CORE_ERROR - fatal errors that occur during PHP's initial startup ; E_CORE_WARNING - warnings (non fatal errors) that occur during PHP's initial startup ; E_COMPILE_ERROR - fatal compile-time errors ; E_COMPILE_WARNING - compile-time warnings (non fatal errors) ; E_USER_ERROR - user-generated error message ; E_USER_WARNING - user-generated warning message ; E_USER_NOTICE - user-generated notice message ; Examples: ; error_reporting=E_ALL & ~E_NOTICE ; show all errors, except for notices ; error_reporting=E_COMPILE_ERROR|E_ERROR|E_CORE_ERROR ; show only errors error_reporting=E_ALL & ~E_NOTICE ; Show all errors except for notices
还有为什么在APACHE服务器出现下面的错误呢? //////// Method Not Allowed The requested method POST is not allowed for the URL /php/login/login.php. --------------------------------------------------------------------------------Apache/1.3.20 Server at julise Port 80
; E_ALL - All errors and warnings
; E_ERROR - fatal run-time errors
; E_WARNING - run-time warnings (non fatal errors)
; E_PARSE - compile-time parse errors
; E_NOTICE - run-time notices (these are warnings which often result from a bug in
; your code, but it's possible that it was intentional (e.g., using an
; uninitialized variable and relying on the fact it's automatically
; initialized to an empty string)
; E_CORE_ERROR - fatal errors that occur during PHP's initial startup
; E_CORE_WARNING - warnings (non fatal errors) that occur during PHP's initial startup
; E_COMPILE_ERROR - fatal compile-time errors
; E_COMPILE_WARNING - compile-time warnings (non fatal errors)
; E_USER_ERROR - user-generated error message
; E_USER_WARNING - user-generated warning message
; E_USER_NOTICE - user-generated notice message
; Examples:
; error_reporting=E_ALL & ~E_NOTICE ; show all errors, except for notices
; error_reporting=E_COMPILE_ERROR|E_ERROR|E_CORE_ERROR ; show only errors
error_reporting=E_ALL & ~E_NOTICE ; Show all errors except for notices
if (!isset($name)) {
$name = '' ;
}
if (!isset($password)) {
$password = '' ;
}
$姓名=$name;
$密码=$password;
echo "姓名:".$姓名."<br>";
echo "密码:".$密码 ;
?>
$姓名=$_POST["name"];
$密码=$_POST["password"];
echo "姓名:".$姓名."<br>";
echo "密码:".$密码 ;
?>
这样可不可以。
$username="";
$password=""
1.iis下面的php? 还aspx呢
2.不要用中文作变量名
3.木星问题,$_POST['']
////////
Method Not Allowed
The requested method POST is not allowed for the URL /php/login/login.php.
--------------------------------------------------------------------------------Apache/1.3.20 Server at julise Port 80
[email protected]
不过你在传post的数据的时候就用$_POST["变量"]来接就可以了。
不过你在传get的数据的时候就用$_GET["变量"]来接就可以了。
一个就是你传过来的$name;没有接到值($_POST["name"]就可以接到了。)
因为没有接到传你的$姓名他没有赋到值。
而在这里如果你不给一个变量赋初值是错误的。
有的机器没有出现是因为他在php.ini中把他给设掉了不显示。其关错误还是存在的。不知道你能不能听懂。不懂的话给我发短消息吧。