使用freamset和fream做分页网站的好处(thinlphp)

使用frameset分割网页的话,就不需要为你网站的二级页面,在控制器里写对应的方法(函数),只需要将所有“跳转button”的a标签的href跳转到index(被你分割的页面)再加键值对,另外还需要在index的方法接收键值对,并将键值对传到index.html页面:

<!--html 页面-->
<!--target="_top是必不可少的,不然会出现画中画的现象"-->
<a href="__URL__/index?direct=contant" target="_top">contant</a>   
<a href="__URL__/index?direct=home" target="_top">Home</a>


<!--------点击a标签则跳转到下面的php页面--------------------------------------------------->

/***********php页面***********/
public function index(){
    $this->assign('direct',$_GET['direct']);
    $this->display();
}

/*********php接收到html页面的数据,处理即跳转到index.html***********/

<!----------index.html---------------->

<frameset rows="50px,*" frameborder="no" > 
   <frame src="__URL__/title" name="title" scrolling="no"  noresize/>
   <frame src="__URL__/{$direct}" name="content" frameborder="no"/>
</frameset>




你可能感兴趣的:(使用freamset和fream做分页网站的好处(thinlphp))