关于thinkphp默认路径的问题
<?phpnamespaceAdmin\Controller;useThink\Controller;classZidongControllerextendsCommon...
<?php
namespace Admin\Controller;
use Think\Controller;
class ZidongController extends CommonController {
public function index() {
$this->buildHtml('index',HTML_PATH.'/News/',HTML_INDEX.'index','utf-8');
$this->display();
}
}
这是我在后台控制器的代码
define('HTML_PATH','./htm');
define('HTML_INDEX','./Application/Home/View/default/Index/');
这是我在接口文件放的路径
但我打开页面时报错显示出来的路径是这样的
<h1>模板不存在:./Application/Admin/View/./Application/Home/View/default/Index/index.html</h1>
应该如何把前面的./Application/Admin/View/去掉 求教!!! 展开
namespace Admin\Controller;
use Think\Controller;
class ZidongController extends CommonController {
public function index() {
$this->buildHtml('index',HTML_PATH.'/News/',HTML_INDEX.'index','utf-8');
$this->display();
}
}
这是我在后台控制器的代码
define('HTML_PATH','./htm');
define('HTML_INDEX','./Application/Home/View/default/Index/');
这是我在接口文件放的路径
但我打开页面时报错显示出来的路径是这样的
<h1>模板不存在:./Application/Admin/View/./Application/Home/View/default/Index/index.html</h1>
应该如何把前面的./Application/Admin/View/去掉 求教!!! 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询