PHP smarty Access display blank, what content is not?

Source: Internet
Author: User
Visit 127.0.0.1/smarty/test/test.php A blank there's nothing there
Chrome Console Report Server 500
But there's no such error in Chrome's stealth version.
Don't know what reason, little white help.
The test.php code is as follows


  
   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");  //模板名称  

Test.html placed in the TPL folder

               {$title}                   {$content}       

The ubuntut14.04 is used.

Reply content:

Visit 127.0.0.1/smarty/test/test.php A blank there's nothing there
Chrome Console Report Server 500
But there's no such error in Chrome's stealth version.
Don't know what reason, little white help.
The test.php code is as follows


  
   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");  //模板名称  

Test.html placed in the TPL folder

               {$title}                   {$content}       

The ubuntut14.04 is used.

ini_set("display_errors","On"); error_reporting(E_ALL &~ E_NOTICE)

PHP configuration file default settings do not display error, you can set the php.ini file directly

Modify display_errors = off to

Display_errors = On
Can.

  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.