您的位置:首頁技術文章
文章詳情頁

為什么我輸入了refresh不會跳轉?請教大神支招!

瀏覽:56日期:2022-06-10 13:24:04

問題描述

<?php

header('content-type:text/html;charset=utf-8');

if(isset($_post['submit'])){

$username = $_post['username'];

$password = $_post['password'];

if(empty($username)||empty($password)){

header('Refresh:3;url=login.php');

echo '用戶名密碼不能為空';

exit;

}

}else{

include_once 'templates/login.html';

}

?>

問題解答

回答1:

找出問題了,是php的變量沒注意區分大小寫

相關文章:
国产综合久久一区二区三区