作者:mobiledu2502906927 | 来源:互联网 | 2018-05-23 10:08
访问127.0.0.1smartytesttest.php一片空白什么也没有chrome控制台报server500但在chrome的隐身版本里没有这个错误不知道什么原因,小白求助。。test.php代码如下{代码...}放在tpl文件夹的test.htm...
访问127.0.0.1/smarty/test/test.php 一片空白 什么也没有
chrome 控制台报 server 500
但在chrome的隐身版本里没有这个错误
不知道什么原因,小白求助。。
test.php代码如下
left_delimiter ="{";//左定界符
$smarty->right_delimiter="}";
$smarty->template_dir ="tpl";//视图模板存放地址
$smarty->compile_dir="template_c"; //模板编译后的存放目录
$smarty->cache_dir = "cache"; //缓存
$smarty->caching = true;
$smarty->cache_lifetime = 120; //缓存时间
$smarty->assign("title","标题"); //变量,value
$smarty->assign("content","内容");
$smarty->display("test.html"); //模板名称
?>
放在tpl文件夹的 test.html
{$content}
使用的是ubuntut14.04。
回复内容:
访问127.0.0.1/smarty/test/test.php 一片空白 什么也没有
chrome 控制台报 server 500
但在chrome的隐身版本里没有这个错误
不知道什么原因,小白求助。。
test.php代码如下
left_delimiter ="{";//左定界符
$smarty->right_delimiter="}";
$smarty->template_dir ="tpl";//视图模板存放地址
$smarty->compile_dir="template_c"; //模板编译后的存放目录
$smarty->cache_dir = "cache"; //缓存
$smarty->caching = true;
$smarty->cache_lifetime = 120; //缓存时间
$smarty->assign("title","标题"); //变量,value
$smarty->assign("content","内容");
$smarty->display("test.html"); //模板名称
?>
放在tpl文件夹的 test.html
{$content}
使用的是ubuntut14.04。
ini_set("display_errors","On"); error_reporting(E_ALL &~ E_NOTICE)
PHP配置文件默认设置不显示报错,可以直接设置php.ini文件
将display_errors = Off修改成
display_errors = On
即可。