$array = array('1','2','3');
define("CONST_ARR", $array);
print_r(constant("CONST_ARR"));//并没有任何信息
不知楼主需求是什么,或许可以用其它全局变量,比方说session

解决方案 »

  1.   

    class TopNavigatorBarMapping{
    $first_level_dir=array('mywan'=>'我的玩网');

    $second_level_dir=array(
    'add_article'=>'博客文章',
    'add_email'=>'站内短信',
    'add_message'=>'站内留言',
    'consolo_friend'=>'好友管理',
    'more_article'=>'博客文章',
    'more_bulletin'=>'站内公告',
    'more_email_inbox'=>'站内短信',
    'more_message'=>'站内留言',
    'reply_email'=>'站内短信',
    'reply_message'=>'站内留言',
    'search_gamer'=>'用户搜索',
    'search_pk_match'=>'擂台赛搜索',
    'search_player'=>'球员搜索',
    'show_all_match_score'=>'玩家成绩',
    'show_article'=>'文章',
    'show_bulletin'=>'站内留言',
    'show_email'=>'站内短信',
    'show_message'=>'站内留言'
    );

    public function TopNavigatorBarMapping(){

    }
      

  2.   

    那傻傻的问一下,怎么设置为长量?
    final一下吗??
      

  3.   

    in php manual :常量只能包含标量数据(boolean,integer,float 和 string)。so it can not be an array.