Index.php
<?php
namespace app\index\controller;
use think\Controller;
class Index extends Controller
{
public function index()
{
return $this->fetch();
}
}
Cate.php
<?php
namespace app\index\controller;
use think\Controller;
class Cate extends Controller
{
public function index()
{
return $this->fetch('cate');
}
}
Article.php
<?php
namespace app\index\controller;
use think\Controller;
class Article extends Controller
{
public function index()
{
return $this->fetch('article');
}
}
引用页面css、js、img 路径用常量替换
__PUBLIC__ = http://127.0.0.1/tp5/public/static/index
页面分离/公共