Home  >  Article  >  Backend Development  >  不能修改常量的值?该怎么解决

不能修改常量的值?该怎么解决

WBOY
WBOYOriginal
2016-06-13 13:42:27939browse

不能修改常量的值?
define('SESS_ID', $sess->get_session_id());

PHP code
<!--

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

-->
if(empty(SESS_ID))
{
 SESS_ID = 'xxwe';
}


为什么报错啊

------解决方案--------------------
PHP code

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

#==============================

if ( !defined('SESS_ID') ) {
    echo "木有定义哦~";
    define('SESS_ID', 'xxwe');
} <div class="clear">
                 
              
              
        
            </div>
Statement:
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