1.6 用TP读取模版出错

forwebreg

1.5的时候
$html = ThinkPHP::render(base_path() . '/tpls/emails/default.html', [], '');
1.6的时候
$html = ThinkPHP::render('/tpls/emails/default.html', [], '');
报错 template not exists:default.html
打印
var_dump($viewPath); string(50) "/Users/james/Projects/PHP/wokman/tpls/emails/"
var_dump($template); string(12) "default.html"

需要修改
截图

123 1 0
1个回答

nitron
  • 暂无评论
×
🔝