使用frameset分割网页的话,就不须要为你网站的二级页面,在控制器里写对应的方法(函数),只须要将全部“跳转button”的a标签的href跳转到index(被你分割的页面)再加键值对,另外还须要在index的方法接收键值对,并将键值对传到index.html页面:php
<!--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>