我的配置文件是这样写的
空间显示页面在
wwwroot(主页文件夹) ccc date 2个文件夹
按这个配置放到 wwwroot 里 不能输出正常显示页面 而且也不提示错误信息..
我不放在这个文件夹放在 ccc 应该要怎样修改配置<?php
include_once("class/Smarty.class.php"); //******************
$smarty = new smarty();
$smarty->debugging=false;
$smarty->compile_check=false;
$smarty->template_dir = "./templates/".$smartytpl;
$smarty->compile_dir = "./templates_c/";
$smarty->config_dir = "./config/";
$smarty->cache_dir = "./cache/";
$smarty->caching = false; //上传要 true
$smarty->cache_lifetime = 118;
$smarty->left_delimiter = "{";
$smarty->right_delimiter = "}";
//******************
?>
空间显示页面在
wwwroot(主页文件夹) ccc date 2个文件夹
按这个配置放到 wwwroot 里 不能输出正常显示页面 而且也不提示错误信息..
我不放在这个文件夹放在 ccc 应该要怎样修改配置<?php
include_once("class/Smarty.class.php"); //******************
$smarty = new smarty();
$smarty->debugging=false;
$smarty->compile_check=false;
$smarty->template_dir = "./templates/".$smartytpl;
$smarty->compile_dir = "./templates_c/";
$smarty->config_dir = "./config/";
$smarty->cache_dir = "./cache/";
$smarty->caching = false; //上传要 true
$smarty->cache_lifetime = 118;
$smarty->left_delimiter = "{";
$smarty->right_delimiter = "}";
//******************
?>
include_once("class/Smarty.class.php");
$global['path']['root'] = dirname(__FILE__) . '/'; //网站根目录
$smarty = new Smarty();
$smarty->template_dir = $global['path']['root'] . 'templates/default/'; //smarty缓存文件存放的目录,我这边是 themes/default/
$smarty->compile_dir = $global['path']['root'] . 'tmp/templates_c/';
$smarty->config_dir = $global['path']['root'] . 'conf/';
$smarty->cache_dir = $global['path']['cache']. 'smarty/';
$smarty->caching = 0;
$smarty->cache_lifetime = 6000;
$smarty->left_delimiter = '<!--{';
$smarty->right_delimiter = '}-->';
$smarty->trusted_dir = $global['path']['root'];
$global['path']['root'] = dirname(__FILE__) . '/'; //网站根目录
$smarty = new Smarty();
$smarty->template_dir = $global['path']['root'] . 'templates/default/'; //smarty缓存文件存放的目录,我这边是 themes/default/
$smarty->compile_dir = $global['path']['root'] . 'tmp/templates_c/';
$smarty->config_dir = $global['path']['root'] . 'conf/smarty/';
$smarty->cache_dir = $global['path']['root']. 'cache/smarty/';
$smarty->caching = 0;
$smarty->cache_lifetime = 6000;
$smarty->left_delimiter = '<!--{';
$smarty->right_delimiter = '}-->';
$smarty->trusted_dir = $global['path']['root'];
你的那些配置跟我差不多,不一样地方
$smarty->left_delimiter = '<!--{'; //用这样的方式较好,可以跟其他标签区别开来
$smarty->right_delimiter = '}-->';
$smarty->trusted_dir = dirname(__FILE__) . '/'; //好像是真实的目录,加上这个试下
按如下方式也不行
如 模板上原css路径为 images/css.css
修改为{$t_dir}/images/css.css
$smarty->assign("t_dir","你smarty模板文件夹的路径");我的css是在 images/css.css 与 smarty 同一根目录 wwwroot下
本地 可以,为什么 空间无法显示,是否空间和本地有区别了?