Problems related to the compile_dir path of smarty

Source: Internet
Author: User
Why is the code in the templatestemplates_cconfigscache folder under the root directory of the compile_dir path of smarty reported an error? Fatalerror: Smartyerror: the $ compile_dir '/template smarty's compile_dir Path Problem
Why is the error reported by the code in the templates templates_c configs cache folder under the root directory?

Fatal error: Smarty error: the $ compile_dir '/templates_c/'does not exist, or is not a directory.




------ Solution --------------------
This directory should not exist./templates_c/indicates the root directory of your system, rather than the root directory of your current website.
------ Solution --------------------
Php cannot access the root directory,
Check whether the safe_mode is enabled due to the php. ini setting.
------ Solution --------------------
/Templates_c/
This directory does not exist in the root directory.

------ Solution --------------------
The templates_c/directory does not exist.
The possible cause is that the current point is incorrect,
Echo $ smarty-> $ compile_dir;
What is the path? Then check whether such a directory exists.
------ Solution --------------------
The compilation directory cannot be found. You can specify
You can print it out to see if the name of your compiled directory really exists.
------ Solution --------------------
Specify a template cache directory after the smarty class instance is generated, that is, template_c in your example. Make sure that this directory is relative to your current file
------ Solution --------------------
Top
------ Solution --------------------
View the templates_c point of smarty
------ Solution --------------------
/Aa/bb: This is an absolute path, not a relative path, and you 'd better use an absolute path.
You can use
$ _ SERVER ['document _ root']. "/templates_c/" indicates the templates_c directory (VM) of the ROOT directory of the current website ).
------ Solution --------------------
I just wrote a smarty configuration tutorial today. For more information, see! Http://hi.baidu.com/hdxiaopihai/blog/item/e8a859f0c99311a7a50f5230.html

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.