在本地web的程序是好的(Apache),传到支持PHP的供应商的服务器上出现下列错误
我的程序涉及到写本地文件,是不是这个问题?或者是php的版本问题那Block with name Header does't existBlock with name SectionList does't existBlock with name Left does't existBlock with name Footer does't existBlock with name SectionList does't existBlock with name main does't exist程序涉及到类似如下语句
function parse($sTplName, $bRepeat)
{
if(isset($this->DBlocks[$sTplName]))
{
if($bRepeat && isset($this->ParsedBlocks[$sTplName]))
$this->ParsedBlocks[$sTplName] = $this->ParsedBlocks[$sTplName] . $this->ProceedTpl($this->DBlocks[$sTplName]);
else
$this->ParsedBlocks[$sTplName] = $this->ProceedTpl($this->DBlocks[$sTplName]);
}
else
{
echo "<br><b>Block with name <u><font color=\"red\">$sTplName</font></u> does't exist</b><br>";
}
}
我的程序涉及到写本地文件,是不是这个问题?或者是php的版本问题那Block with name Header does't existBlock with name SectionList does't existBlock with name Left does't existBlock with name Footer does't existBlock with name SectionList does't existBlock with name main does't exist程序涉及到类似如下语句
function parse($sTplName, $bRepeat)
{
if(isset($this->DBlocks[$sTplName]))
{
if($bRepeat && isset($this->ParsedBlocks[$sTplName]))
$this->ParsedBlocks[$sTplName] = $this->ParsedBlocks[$sTplName] . $this->ProceedTpl($this->DBlocks[$sTplName]);
else
$this->ParsedBlocks[$sTplName] = $this->ProceedTpl($this->DBlocks[$sTplName]);
}
else
{
echo "<br><b>Block with name <u><font color=\"red\">$sTplName</font></u> does't exist</b><br>";
}
}
var $DBlocks = array(); // initial data:files and blocks还有
function load_file($filename, $sName)
{
$nName = "";
$template_path = $this->templates_root . "/" . $filename;
if (file_exists($template_path))
{
$this->DBlocks[$sName] = join('',file($template_path));
$nName = $this->NextDBlockName($sName);
while($nName != "")
{
$this->SetBlock($sName, $nName);
$nName = $this->NextDBlockName($sName);
}
}
}貌似文件没找到,PHP不太用 见笑了
我觉得是否服务器不支持文件读取?
你是用什么模板吧?看看本地与服务器的phpinfo()差别,可能配置不同
检查一下文件权限也有可能$this->templates_root 设置不对的问题