YII Blog
Yeah Cheung 's Yeah Cheung
yeah
如需合作,请发邮件! (realloveyou@foxmail.com)
热门文章
搜索
计数器
64555
最新留言
链接
最新评论
URL重定向
<?php
/**
* URL重定向
*
* @param string $url
* @param int $time
* @param boolean $js
* @param string $msg
public function redirect($url,$time=0, $js = false, $msg='')
{
//多行URL地址支持
$url = str_replace(array("\n", "\r"), '', $url); //如果为多行地址,去除\n \r
if (!headers_sent()) { //判断header头是否已经发送
// redirect
if(0===$time) {
header("Location: ".$url);
}else {
header("refresh:{$time};url={$url}");
echo($msg);
}
exit();
} else if(!$js) { //header头已经发送,并且采用非js方式跳转
$str = "<meta http-equiv='Refresh' content='{$time};URL={$url}'>";
if($time!=0)
$str .= $msg;
exit($str);
} else { //采用js方式跳转
$str = "<script type=\"text/javascript\">
alert('" . $msg . "');
setTimeout(\"location='" . $url . "';\", " . $time . ");";
}
}
?>
/**
* URL重定向
*
* @param string $url
* @param int $time
* @param boolean $js
* @param string $msg
public function redirect($url,$time=0, $js = false, $msg='')
{
//多行URL地址支持
$url = str_replace(array("\n", "\r"), '', $url); //如果为多行地址,去除\n \r
if (!headers_sent()) { //判断header头是否已经发送
// redirect
if(0===$time) {
header("Location: ".$url);
}else {
header("refresh:{$time};url={$url}");
echo($msg);
}
exit();
} else if(!$js) { //header头已经发送,并且采用非js方式跳转
$str = "<meta http-equiv='Refresh' content='{$time};URL={$url}'>";
if($time!=0)
$str .= $msg;
exit($str);
} else { //采用js方式跳转
$str = "<script type=\"text/javascript\">
alert('" . $msg . "');
setTimeout(\"location='" . $url . "';\", " . $time . ");";
}
}
?>
May 03, 2019 02:12:40 PM
cashback offers on shopping when you shop from this site gives you the best cashback offers on every time you visit here.
May 31, 2019 03:36:06 PM
cashback offers on shopping when you shop from this site gives you the best cashback offers on every time you visit here.
Feb 20, 2020 08:06:27 PM
More than 200 British assignment writers and 24/7 customer support make us #1 assignment writing service in the market. Up to 30% off online assignment full dissertation help. You can find also find many courses here online java assignment help .
May 12, 2020 05:52:58 PM
Excellent Article. This is really a great stuff. I am very happy to have found this information.
<a href="https://www.allassignmenthelp.com/us/college-paper-writing-service.html
">professional dissertation writer online</a>
<a href="https://www.allassignmenthelp.com/do-my-essay.html">do your essay</a>
May 16, 2020 10:26:47 PM
Save your time with assignment help in all possible subjects! Original, high quality assignments from top quality writers.
May 16, 2020 10:27:30 PM
NICE BLOG.
May 18, 2020 07:58:52 PM
Nice informatics article. I have get a lot of information, thank you very much for this.
May 20, 2020 04:09:52 PM
If you are looking for good work then we provide the best high-quality essay and other Do my essay assignment help online services.
May 20, 2020 04:12:25 PM
Assignment help students from different parts of the world rely on our service, as we are providing secure payment gateways, confidentiality agreements, and financial aid centers for communication.
May 20, 2020 04:13:12 PM
College students can contact us to get good grades in Homework writing service. We will also help you with cheap online assistance at affordable prices by professional experts.
Jun 06, 2020 06:25:28 PM
Nice Article thanks for your valuable information post UK assignment help websites in uk me at any time with good hire essay efficiently without hindrances UK assignment help
May 27, 2021 07:33:12 PM
Are you looking for an assignment help service? Then our platform is here where you can get excellent assignment papers. Our writers are specialized in writing having good skills in writing any type of papers. We know the techniques of writing. Our team of custom writers will help you throughout your project or final year’s assignments. As we know that some students are not smart enough to deal with some technical assignments. Our main motive is to guide students properly. If any of the students order from us we will help them as a tutor. We are providing academic services for more than 10 years. We will meet all targets within the given deadline. For more info contact us at buy assignment help services.
Aug 01, 2021 09:28:12 PM
This is one way Fantastic Scanners work: You signify all about what you want and you will handle all others - web sites guaranteed terminate of tenancy housecleaning, expert upholstery cleaning, professional stove valeting, upholstery maintenance, commercial work cleaning and better! We should send role-specific professionals right to your setting in Dubai. Cleaning specialists will carry out each and additionally all steps with diligence while taking your own private requirements right into full attention.
Sep 27, 2021 02:27:02 PM
That doesn’t love a home smelling amazing the whole day, irrespective associated with weathers? Certainly, everyone will. It’s right now possible to create your home sniffing delightful all day long and every single day of the actual week. Indeed, you study it completely right. Just you need to adapt some tricks and tips to preserve a inviting environment for the guests.