-2

在我的程序中,我调用了getParams()方法,但只有10个参数。在我的main.php配置文件中,还有更多,为什么?这是 main.php 的参数部分

 'params'=>array(

    'adminEmail'=>'webmaster@example.com',
    'AccountDB' => 'db_account_dev',
    'orderDB' => 'db_order_dev',
'staticPath'=>dirname(__FILE__).DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR,
    'commonDB' => 'db_common',
    'payDB' => 'db_pay_dev',
    'crmDB' => 'db_crm_dev',
    'queue' => array(
        'email' => array(
            array(
                'host' => '127.0.0.1',
                'port' => 11300,
            ),
        ),
        'sms' => array(
            array(
                'host' => '127.0.0.1',
                'port' => 11330,
            ),
        ),
        'sale_record' => array(
            array(
                 'host' => '192.168.0.201',
                 'port' => 11300,
            ),
        ),
    ),
    'discuz' => array(
        'DBName'    => 'db_ultrax',
        'TablePrefix'  => 'pre_',
        'authKey'   => '00fefan5JEvKdiEQ',
    ),
    'freight' => require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'freight.php'),
    'allowCheckTaskSubId' => 224,
    'allowCheckEmail' => 242,
    'allowCheckPass' => 243,
    'codFee' => 10,
    'cancelFee' => 10, 

)

但是,该方法只返回一些项目

  1. adminEmail=>webmaster@example.com
  2. orderDB=>db_order_dev
  3. payDB=>db_pay
  4. AccountDB=>db_account
  5. commonDB=>db_common
  6. 货运=>数组
  7. 码费=>10
  8. saleRoleId=>9
  9. 销售经理=>11
  10. 增长=>数组
4

1 回答 1

1

我得到了答案。控制台应用程序的配置文件是protected/config/console.php 而Web 应用程序的配置文件是protected/config/main.php 它们是不同的!来自控制台应用程序的上述代码

于 2012-05-22T05:44:21.473 回答