2016-10-03 56 views

回答

0

HTML

<a href="redirect.php">text</a> 

redirect.php

<?php 
    session_start(); 
    if($_SESSION['smth']){ 
     header("location: page.php"); 
    } else { 
     // to do what you want 
    } 
?> 
+0

我試過了。通過這種方式,page.php中的$ _SESSION不起作用 –

+0

顯示來自page.php的代碼 –

+0

發佈頁面的一部分 –