这是因为你没有认真阅读smarttemplate所带的说明文档所造成的。 在readme.txt中有 2. Copy the class.*.php files and the smarttemplate_extensions folder to your PHP include folder (Specified in your php.ini: include_path= XXX) 3. Edit the class.smarttemplate.php file and adjust the configuration according to your system configuration: $temp_dir : The folder where the compiled templates can be stored. PHP must have write access to this folder! $cache_dir : The folder where output cache files can be stored (if used). PHP must have write access to this folder! 4. Copy the examples folder to somewhere below your document root, so you can access with your browser. 5. Have a look at the examples in the examples folder to see how SmartTemplate works.当然你并不一定要这样做,但是你必须清楚你在做什么。 对于初学者还是遵循条条较好
$_CONFIG['reuse_code'] = false;
$_CONFIG['template_dir'] = TEMPLATE_PATH;//模板路径
$_CONFIG['smarttemplate_compiled'] = TEMP_PATH;//临时文件路径
$_CONFIG['smarttemplate_cache'] = CACHE_PATH;//缓存路径
$_CONFIG['cache_lifetime'] = 30*60*60*24; //缓存一天
因为考虑到虚拟主机的问题,我有此一问~
欢迎大家告诉我答案,谢谢
因为考虑到虚拟主机的问题,我有此一问~
欢迎大家告诉我答案,谢谢
不设置PHP。INI等服务器端文件能用smarttemplate吗?
因为考虑到虚拟主机的问题,我有此一问~
欢迎大家告诉我答案,谢谢
不设置PHP。INI等服务器端文件能用smarttemplate吗?
因为考虑到虚拟主机的问题,我有此一问~
欢迎大家告诉我答案,谢谢
$_CONFIG['reuse_code'] = false;
$_CONFIG['template_dir'] = "./templates/";//模板路径
$_CONFIG['smarttemplate_compiled'] = "./temp/";//临时文件路径
$_CONFIG['smarttemplate_cache'] = "./cache/";//缓存路径
$_CONFIG['cache_lifetime'] = 30*60*60*24; //缓存一天然后
require_once("class.smarttemplate.php");就可以用了
感觉确实不错。比smarty好学多了~
哪个冰山新闻系统,还有以前忘记是谁发的哪个最简单的开发模式
都用的是smarttemplate,你可以看看别人的example,很不错的
刚刚解决了这个问题
http://suixinmao.blogchina.com/blog/article_70581.771668.html
在readme.txt中有
2. Copy the class.*.php files and the smarttemplate_extensions folder to your PHP include folder
(Specified in your php.ini: include_path= XXX)
3. Edit the class.smarttemplate.php file and adjust the configuration according to your system configuration:
$temp_dir : The folder where the compiled templates can be stored. PHP must have write access to this folder!
$cache_dir : The folder where output cache files can be stored (if used). PHP must have write access to this folder!
4. Copy the examples folder to somewhere below your document root, so you can access with your browser.
5. Have a look at the examples in the examples folder to see how SmartTemplate works.当然你并不一定要这样做,但是你必须清楚你在做什么。
对于初学者还是遵循条条较好