Update tutorial-yii-integration.md

This commit is contained in:
崔亮
2018-11-20 11:41:04 +08:00
committed by GitHub
parent 08487e92e4
commit b0f5e5d000

View File

@ -86,12 +86,12 @@ Yii::$classMap['Class2'] = 'path/to/Class2.php';
composer require yiisoft/yii2
```
In case you would like to use only the database abstraction layer or other non-asset related features of Yii,
you should require a special composer package that prevent Bower and NPM packages installation. See
[cebe/assetfree-yii2](https://github.com/cebe/assetfree-yii2) for details.
如果您只想使用数据库抽象层或 Yii 的其他非静态资源的相关功能,
您应该需要一个特殊的 composer 包来阻止 Bower NPM 包的安装。
有关详细信息,请参见 [cebe/assetfree-yii2](https://github.com/cebe/assetfree-yii2)
See also the general [section about installing Yii](start-installation.md#installing-via-composer) for more information
on Composer and solution to possible issues popping up during the installation.
有关 Composer 的更多信息以及安装过程中可能出现的问题的解决方案,另请参见
[关于安装 Yii 的部分](start-installation.md#installing-via-composer)。
不然的话,你可以[下载](http://www.yiiframework.com/download/) Yii 的发布包,
并把它解压到对应系统的 `BasePath/vendor` 目录内。
@ -102,7 +102,7 @@ on Composer and solution to possible issues popping up during the installation.
require __DIR__ . '/../vendor/yiisoft/yii2/Yii.php';
$yiiConfig = require __DIR__ . '/../config/yii/web.php';
new yii\web\Application($yiiConfig); // 千万别在这调用 run() 方法。(笑)
new yii\web\Application($yiiConfig); // 不要在这调用 run() 方法。
```
如你所见,这段代码与典型的 Yii 应用的[入口脚本](structure-entry-scripts.md)非常相似。