看板 PHP 關於我們 聯絡資訊
請問 我有下列這些檔案 lib.php <? session_start(); function auth(){ if(empty($_SESSION['agree'])){ header('Location:agreement.php'); } } ?> ================================================ agreement.php <html> .... <form action="agree.php" ....> .... </form> .... </html> =============================================== agree.php <? include('lib.php'); if(...){ $_SESSION['agree']='yes'; } header('Location:index.php'); ?> =============================================== index.php <? include('lib.php'); auth(); ?> 有時候填完表單可以正常回到index.php,顯示index.php之後的內容 但大部分時候會一直回到agreement.php 請問可能是什麼原因造成這不穩定的結果? -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 221.169.71.109 ※ 編輯: gmobug 來自: 221.169.71.109 (09/04 02:15)