Smarty shows whitepage most time
Hi I have an application which is developed used Smarty 2.6.26 template engine.
The application was working fine till last week. Now I am getting a strange scene. Sometimes or frequently my sites displays whitepage instead of my website contents. Cleaning the templates_c directory fixes the issue. But this happens on a continuous bases. I have not enabled the smarty caching in my application.
Any help highly appreciated.
Things I have already tried
$smarty->compile_check = false; ( changed to false from true )
My Current Smarty settings
define('SMARTY_DIR', 'Smarty/libs/');
require_once(SMARTY_DIR . 'Smarty.class.php');
$smarty = new Smarty;
$smarty->compile_check = false;
$smarty->debugging = false;
$smarty->template_dir = 'view';
$开发者_开发知识库smarty->compile_dir = 'templates_c';
You can see if it's compile caching by setting force_compile
.
$smarty->force_compile = true;
This should only be used for debugging. I have the same problem as you when I am working in my development environment when I try to refresh the browser to see the changes and the changed file has not finished copying to the test server.
精彩评论