部分实验性质的性能优化

This commit is contained in:
Chenx221 2024-06-14 16:23:24 +08:00
parent 90eac27dae
commit 867611421a
Signed by: chenx221
GPG Key ID: D7A9EC07024C3021
6 changed files with 9 additions and 25 deletions

View File

@ -8,6 +8,6 @@ class EChartsAsset extends AssetBundle
{ {
public $sourcePath = '@npm/echarts/dist'; public $sourcePath = '@npm/echarts/dist';
public $js = [ public $js = [
'echarts.js', 'echarts.min.js',
]; ];
} }

View File

@ -8,7 +8,7 @@ class QuillAsset extends AssetBundle
{ {
public $sourcePath = '@npm/quill/dist'; public $sourcePath = '@npm/quill/dist';
public $js = [ public $js = [
'quill.js', 'quill.min.js',
]; ];
public $css = [ public $css = [
'quill.snow.css', 'quill.snow.css',

View File

@ -11,10 +11,10 @@ return [
'charset' => 'utf8', 'charset' => 'utf8',
'schemaMap' => [ 'schemaMap' => [
'mysql' => SamIT\Yii2\MariaDb\Schema::class 'mysql' => SamIT\Yii2\MariaDb\Schema::class
] ],
// Schema cache options (for production environment) // Schema cache options (for production environment)
//'enableSchemaCache' => true, 'enableSchemaCache' => true,
//'schemaCacheDuration' => 60, 'schemaCacheDuration' => 60,
//'schemaCache' => 'cache', 'schemaCache' => 'cache',
]; ];

View File

@ -21,7 +21,7 @@ $config = [
'authManager' => [ 'authManager' => [
'class' => 'yii\rbac\DbManager', 'class' => 'yii\rbac\DbManager',
// uncomment if you want to cache RBAC items hierarchy // uncomment if you want to cache RBAC items hierarchy
// 'cache' => 'cache', 'cache' => 'cache',
], ],
'request' => [ 'request' => [
// !!! insert a secret key in the following (if it is empty) - this is required by cookie validation // !!! insert a secret key in the following (if it is empty) - this is required by cookie validation

View File

@ -1,16 +0,0 @@
<?php
// NOTE: Make sure this file is not accessible when deployed to production
if (!in_array(@$_SERVER['REMOTE_ADDR'], ['127.0.0.1', '::1'])) {
die('You are not allowed to access this file.');
}
defined('YII_DEBUG') or define('YII_DEBUG', true);
defined('YII_ENV') or define('YII_ENV', 'test');
require __DIR__ . '/../vendor/autoload.php';
require __DIR__ . '/../vendor/yiisoft/yii2/Yii.php';
$config = require __DIR__ . '/../config/test.php';
(new yii\web\Application($config))->run();

View File

@ -1,8 +1,8 @@
<?php <?php
// comment out the following two lines when deployed to production // comment out the following two lines when deployed to production
defined('YII_DEBUG') or define('YII_DEBUG', true); //defined('YII_DEBUG') or define('YII_DEBUG', true);
defined('YII_ENV') or define('YII_ENV', 'dev'); //defined('YII_ENV') or define('YII_ENV', 'dev');
require __DIR__ . '/../vendor/autoload.php'; require __DIR__ . '/../vendor/autoload.php';
require __DIR__ . '/../vendor/yiisoft/yii2/Yii.php'; require __DIR__ . '/../vendor/yiisoft/yii2/Yii.php';