1.C:\phpStudy\PHPTutorial\WWW\owz\application\index\view
创建Index、Banner、Qh文件夹和index.htnl、banner.html(轮播图)、qh.html(底部的产品信息)文件;
2.C:\phpStudy\PHPTutorial\WWW\owz\application\index\controller\Index.php
要把index.htnl、banner.html、qh.html里的路径的CSS、JS和图片路径!
*******************************************************************************************
方法不存在:app\index\controller\Index->banner()(Bug)
C:\phpStudy\PHPTutorial\WWW\owz\application\index\controller
创建Banner.php文件,内容:
<?php
namespace app\index\controller;
use think\Controller;
class Banner extends Controller
{
public function banner()
{
return $this->fetch();
}
}
C:\phpStudy\PHPTutorial\WWW\owz\application\index\view\Index\index.html
原内容:
<div class="main">
<div class="main1">
<div class="main1a">
<iframe width="1013px" height="478px" src="banner.html" scrolling="no"
frameborder="0" allowtransparency="true" onload="this.height=this.contentWindow.document.documentElement.scrollHeight"></iframe>
</div>
</div>
修改为:
<div class="main">
<div class="main1">
<div class="main1a">
<iframe width="1013px" height="478px" src="../banner/banner.html" scrolling="no"
frameborder="0" allowtransparency="true" onload="this.height=this.contentWindow.document.documentElement.scrollHeight"></iframe>
</div>
</div>
http://www.iheyu.com/owz/public/inde