Home > Backend Development > PHP Tutorial > ECSHOP白屏有关问题!

ECSHOP白屏有关问题!

WBOY
Release: 2016-06-13 13:41:14
Original
1082 people have browsed it

ECSHOP白屏问题!在线等!
我用echo("测试");exit;来测试,发现是在
init.php这个文件中下面这段代码后就不执行了。

PHP code
<!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

-->
if (!defined('INIT_NO_USERS'))
{
    /* 初始化session */
    include(ROOT_PATH . 'includes/cls_session.php');

    $sess = new cls_session($db, $ecs->table('sessions'), $ecs->table('sessions_data'));
    
    echo("测试");exit;


    define('SESS_ID', $sess->get_session_id());
}


Copy after login




放到这个里面就不执行了


------解决方案--------------------
1、你的代码不全,常量 INIT_NO_USERS 可能在此之前已经定义了
2、注意修改后保存文件时的代码,ecshop 应该都是要求 utf-8 编码的,如果你将文件保存成了 gbk 的,就可能出现“白屏”
------解决方案--------------------
判断 $sess对象是不是正确
进入get_session_id();排查
------解决方案--------------------
echo("测试");exit;

你都EXIT了 下面的代码就不会执行了

define('SESS_ID', $sess->get_session_id());

 这句就没用了
------解决方案--------------------
在这个if前面再加条打印语句呢
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template