Fatal Error:uncaught-smarty:smarty->is_cached () undefined method <--thrown in/usr/local/apache2/htdocs/ Www/smarty/libs/sysplugins/smarty_internal_undefined.php on line 46
Today uses the IF (!is_cached ("var.html", $_server["Request_uri"])) {
echo "Today is beautiful day!
";
}
To test whether the Smarty cache, the above error, the version of my smarty is: smarty-3.1.29. is not the Smarty version I used this method? If you don't use this method, what's the alternative? Ask God to help you out. Thank you very much.
Reply to discussion (solution)
that you Print_r (get_class_methods (' Smarty ')); Look, you know what?
Besides, you write if (!is_cached ("var.html", $_server["Request_uri"])) {Is it wrong?
Second floor, with
Echo '
';
Var_dump ($smarty);
Echo';
The result is the following,
Object (Smarty) #1 (65) {
["Auto_literal"]=>
BOOL (TRUE)
["Error_unassigned"]=>
BOOL (FALSE)
["Use_include_path"]=>
BOOL (FALSE)
["Template_dir": "Smarty":p rivate]=>
Array (1) {
[0]=>
String ("/usr/local/apache2/htdocs/www/smarty/temp/")
}
["_joined_template_dir"]=>
String ("/usr/local/apache2/htdocs/www/smarty/temp/")
["_joined_config_dir"]=>
String ("/usr/local/apache2/htdocs/www/smarty/configs")
["Default_template_handler_func"]=>
Null
["Default_config_handler_func"]=>
Null
["Default_plugin_handler_func"]=>
Null
["Compile_dir": "Smarty":p rivate]=>
String ("/usr/local/apache2/htdocs/www/smarty/com/")
["Plugins_dir": "Smarty":p rivate]=>
Null
["Cache_dir": "Smarty":p rivate]=>
String ("/usr/local/apache2/htdocs/www/smarty/cache/")
["Config_dir": "Smarty":p rivate]=>
Array (1) {
[0]=>
String ("/usr/local/apache2/htdocs/www/smarty/configs")
}
["Force_compile"]=>
BOOL (FALSE)
["Compile_check"]=>
BOOL (TRUE)
["Use_sub_dirs"]=>
BOOL (FALSE)
["Allow_ambiguous_resources"]=>
BOOL (FALSE)
["Merge_compiled_includes"]=>
BOOL (FALSE)
["Force_cache"]=>
BOOL (FALSE)
["Left_delimiter"]=>
String (2) "<{"
["Right_delimiter"]=>
String (2) "}>"
["Security_class"]=>
String ("Smarty_security")
["Security_policy"]=>
Null
["Php_handling"]=>
Int (0)
["Allow_php_templates"]=>
BOOL (FALSE)
["Debugging"]=>
BOOL (FALSE)
["Debugging_ctrl"]=>
String (4) "NONE"
["smarty_debug_id"]=>
String ("Smarty_debug")
["Debug_tpl"]=>
Null
["Error_reporting"]=>
Null
["Config_overwrite"]=>
BOOL (TRUE)
["Config_booleanize"]=>
BOOL (TRUE)
["Config_read_hidden"]=>
BOOL (FALSE)
["Compile_locking"]=>
BOOL (TRUE)
["Cache_locking"]=>
BOOL (FALSE)
["Locking_timeout"]=>
Int (10)
["Default_resource_type"]=>
String (4) "File"
["Caching_type"]=>
String (4) "File"
["Default_config_type"]=>
String (4) "File"
["Resource_cache_mode"]=>
Int (1)
["Cache_modified_check"]=>
BOOL (FALSE)
["Registered_plugins"]=>
Array (0) {
}
["Registered_objects"]=>
Array (0) {
}
["Registered_classes"]=>
Array (0) {
}
["Registered_filters"]=>
Array (0) {
}
["Registered_resources"]=>
Array (0) {
}
["Registered_cache_resources"]=>
Array (0) {
}
["Autoload_filters"]=>
Array (0) {
}
["Default_modifiers"]=>
Array (0) {
}
["Escape_html"]=>
BOOL (FALSE)
["Start_time"]=>
Float (1461252359.6399)
["_current_file"]=>
Null
["_parserdebug"]=>
BOOL (FALSE)
["_objtype"]=>
Int (1)
["_DEBUG"]=>
Null
["cache_id"]=>
Null
["compile_id"]=>
Null
["Caching"]=>
Int (1)
["Cache_lifetime"]=>
Int (3600)
["_cache"]=>
Array (6) {
["Template_dir_new"]=>
BOOL (TRUE)
["Template_dir"]=>
BOOL (FALSE)
["Compile_dir"]=>
BOOL (TRUE)
["Config_dir_new"]=>
BOOL (TRUE)
["Config_dir"]=>
BOOL (FALSE)
["Cache_dir"]=>
BOOL (TRUE)
}
["Template_class"]=>
String ("Smarty_internal_template")
["Tpl_vars"]=>
Array (0) {
}
["Parent"]=>
Null
["Config_vars"]=>
Array (0) {
}
["Ext"]=>
Object (Smarty_internal_extension_handler) #2 (3) {
["ObjType"]=>
Int (1)
["_property_info": "Smarty_internal_extension_handler":p rivate]=>
Array (7) {
["Autoloadfilters"]=>
Int (0)
["Defaultmodifiers"]=>
Int (0)
["Configvars"]=>
Int (0)
["Debugtemplate"]=>
Int (0)
["Registeredobject"]=>
Int (0)
["Streamvariable"]=>
Int (0)
["Templatevars"]=>
Int (0)
}
["Resolvedproperties": "Smarty_internal_extension_handler":p rivate]=>
Array (0) {
}
}
}
No is_cached () This method, my question to ask is, if there is no is_cached () This method, which method to replace? Thank you very much.
Thank you, the second floor, has been fixed ....