您的位置:首页 > 运维架构

Ecshop打印报价单页面显示空白!

2010-02-04 11:24 323 查看
今天碰到了这样的一个问题,公司的Ecshop模板的网店。打印报价页面,在本地测试可以显示产品价格信息。但在服务器上当点击打印报价单时,页面也空白,什么都没有。先说明一下本地系统是:Windows XP + IIS 5.0 + php 5.0;服务器是Windows Server 2003 +IIS 6.0 +php 5.0。

在网上搜了一下,主要有两个可能原因:
1、在data中,是否有quotation_print.html这个页面。
2、quotation_print.html这个页面是否有足够的权限。

我按网上的资料检查一下,我的情况都不是因为是这两个原因。
我突然想起了,前天有个也是PHP的系统,因为路径问题,无法上传图片,我想是不是这次也是这个原因呢?
于是我测试了一下,发现还真的是这个问题。下面就是我修改的方法。

先找到includes/cls_template.php,接着找到"fetch($filename, $cache_id = '')"这个函数,
在如下的代码

if ($this->_checkfile)
{
if (!file_exists($filename))
{
$filename = $this->template_dir . '/' . $filename;
}
}
else
{
$filename = $this->template_dir . '/' . $filename;
}


后面加上这样的一句:

/*windows 系统绝对目录*/
$filename=substr(__FILE__,0,strrpos(__FILE__,"//"))."//".$filename;
这样就搞定了,php在windows上运行路径还真是个大问题。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: