0
我可以使用普通PHP刷新頁面。 如何使用CodeIgniter執行此操作?如何使用CodeIgniter中的header()函數刷新頁面並重定向到另一頁面
我是PHP嘗試這樣的:
<html>
<title>Thank You</title>
<body bgcolor="#E6E6FA">
<center>
<h1>Thank You For Visiting...Wish you to visit again...</h1>
</center>
<?php
header(refresh:5; url="login_input.php");
?>
</body>
</html>
我知道我必須這樣寫:
"<?php echo base_url();?>index.php/welcome/"
但在哪裏呢?
我是否必須在模型和控制器中創建函數來執行此操作?
頭功能只能之前加載頁面上的任何內容的利用。所以你的原始腳本甚至不應該工作。這就是說,笨有很大'redirect'功能https://ellislab.com/codeigniter/user-guide/helpers/url_helper.html – CollinD
在所有名字的聖擺脫那些'
etc' –
@CollinD :我的猜測是,它的工作原因是某些緩存服務器端延遲發送實際內容。 –