<? //信息提示函数 //msgkey 为信息提示语 url_forward为要跳转到的页面 second为时间 function showmessage($msgkey, $url_forward='', $second=1) { $message = $msgkey; if($url_forward && empty($second)) { header("HTTP/1.1 301 Moved Permanently"); header("Location: $url_forward"); } else { if($url_forward) { $message = "<a href="/" mce_href="/""$url_forward/">$message</a><mce:script type="text/javascript"><!-- setTimeout(/"window.location.href ='$url_forward';/", ".($second*1000)."); // --></mce:script>"; } include ('tpl/template_showmessage.php'); } exit();//在这里终止程序 是为了 在跳转的时候 防止后面的程序继续执行 } showmessage("提示"," http://www.baidu.com",3); ?>