The DoYouHaoBaby PHP Framework中文开发文档手册
Copyright(c) DoYouHaoBaby.NET All Rights Reserved.
页面跳转

系统通过一个内置函数实现跳转:

<?php

/**
  * 跳转消息
  *
  * @param string $message
  * @param string $url
  */
function DyhbMessage($message,$url=''){

 /* url */
 if( $url=='-1' )     {   $url="javascript:history.go(-1);";   }
 elseif( $url=='' )   {   $url=$_SERVER['HTTP_REFERER'];       }
 echo"<html><head>";

   if($url!='0'&&$url!='-1'){echo "<meta http-equiv=\"refresh\" content=\"2;url=$url\">";}

     echo<<<DYHB
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>DyhbFrame 系统消息</title>
<style type="text/css">
body {
 background-color:#F7F7F7;
 font-family: Arial;
 font-size: 12px;
 line-height:150%;
}
.main {
 background-color:#FFFFFF;
 margin-top:20px;
 font-size: 12px;
 color: #666666;
 width:580px;
 margin:10px 200px;
 padding:10px;
 list-style:none;
 border:#DFDFDF 1px solid;
}
.main p {
 line-height: 18px;
 margin: 5px 20px;
}
</style>
<div class="main">
<p>{$message}</p>
DYHB;
   if($url!='0'){  echo "<p><a href=\"$url\">&laquo;点击跳转</a></p>"; }
   echo"</div></body></html>";
   exit();
}

?>