mirror of
				https://github.com/yiisoft/yii2.git
				synced 2025-11-04 14:46:19 +08:00 
			
		
		
		
	Update tutorial-yii-integration.md
This commit is contained in:
		@ -86,12 +86,12 @@ Yii::$classMap['Class2'] = 'path/to/Class2.php';
 | 
				
			|||||||
composer require yiisoft/yii2
 | 
					composer require yiisoft/yii2
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
In case you would like to use only the database abstraction layer or other non-asset related features of Yii,
 | 
					如果您只想使用数据库抽象层或 Yii 的其他非静态资源的相关功能,
 | 
				
			||||||
you should require a special composer package that prevent Bower and NPM packages installation. See 
 | 
					您应该需要一个特殊的 composer 包来阻止 Bower 和 NPM 包的安装。
 | 
				
			||||||
[cebe/assetfree-yii2](https://github.com/cebe/assetfree-yii2) for details.
 | 
					有关详细信息,请参见 [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
 | 
					有关 Composer 的更多信息以及安装过程中可能出现的问题的解决方案,另请参见
 | 
				
			||||||
on Composer and solution to possible issues popping up during the installation.
 | 
					[关于安装 Yii 的部分](start-installation.md#installing-via-composer)。
 | 
				
			||||||
 | 
					
 | 
				
			||||||
不然的话,你可以[下载](http://www.yiiframework.com/download/) Yii 的发布包,
 | 
					不然的话,你可以[下载](http://www.yiiframework.com/download/) Yii 的发布包,
 | 
				
			||||||
并把它解压到对应系统的 `BasePath/vendor` 目录内。
 | 
					并把它解压到对应系统的 `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';
 | 
					require __DIR__ . '/../vendor/yiisoft/yii2/Yii.php';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
$yiiConfig = require __DIR__ . '/../config/yii/web.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)非常相似。
 | 
					如你所见,这段代码与典型的 Yii 应用的[入口脚本](structure-entry-scripts.md)非常相似。
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user