zoukankan      html  css  js  c++  java
  • yii-basic-app-2.0.5/basic/config/web.php

    <?php

    $params = require(__DIR__ . '/params.php');

    $config = [
    'id' => 'basic',
    'basePath' => dirname(__DIR__),
    'bootstrap' => ['log'],
    'components' => [
    'request' => [
    // !!! insert a secret key in the following (if it is empty) - this is required by cookie validation
    'cookieValidationKey' => 'NtpWRYAeSMA71cUiMP3inzMup5oFdiYt',
    'parsers' => [
    'application/json' => 'yiiwebJsonParser',
    ]
    ],
    'cache' => [
    'class' => 'yiicachingFileCache',
    ],
    'user' => [
    'identityClass' => 'appmodelsUser',
    'enableAutoLogin' => true,
    ],
    'errorHandler' => [
    'errorAction' => 'site/error',
    ],
    'mailer' => [
    'class' => 'yiiswiftmailerMailer',
    // send all mails to a file by default. You have to set
    // 'useFileTransport' to false and configure a transport
    // for the mailer to send real emails.
    'useFileTransport' => true,
    ],
    'log' => [
    'traceLevel' => YII_DEBUG ? 3 : 0,
    'targets' => [
    [
    'class' => 'yiilogFileTarget',
    'levels' => ['error', 'warning'],
    ],
    ],
    ],
    'db' => require(__DIR__ . '/db.php'),
    'urlManager' => [
    'enablePrettyUrl' => true,
    'enableStrictParsing' => false, // 不能设置为true
    'showScriptName' => false,
    'rules' => [
    ['class' => 'yii estUrlRule', 'controller' => ['user', 'post']],
    ],
    ],
    ],
    'params' => $params,
    'language' => 'zh-CN',
    ];

    if (YII_ENV_DEV) {
    // configuration adjustments for 'dev' environment
    $config['bootstrap'][] = 'debug';
    $config['modules']['debug'] = 'yiidebugModule';

    $config['bootstrap'][] = 'gii';
    // $config['modules']['gii'] = 'yiigiiModule';
    $config['modules']['gii'] = [
    'class' => 'yiigiiModule',
    'allowedIPs' => ['127.0.0.1', '::1', '192.168.0.*', '192.168.31.134'] // 按需调整这里
    ];
    }

    return $config;
  • 相关阅读:
    angularJs中ngModel的坑
    Angular中ngModel的$render的详解
    typescript中的工具 tsd
    angula组件-通过键盘实现多选(原创)
    angular指令系列---多行文本框自动高度
    微信公众号系列 --- ionic在IOS的键盘弹出问题
    angular Jsonp的坑
    关于js的一些基本知识(类,闭包,变量)
    介绍Angular的注入服务
    2019 SDN大作业
  • 原文地址:https://www.cnblogs.com/jackiehe/p/4712705.html
Copyright © 2011-2022 走看看