Yii2使用教程
Yii2使用教程 安装 中文文档:http://www.yiichina.com/doc/guide/2.0/start-installation 1,安装 这里我直接下载归档文件,压缩包安装了。composer各种麻烦,国情你懂得。 https://github.com/yiisoft/yii2/releases/download/2.0.2/yii-basic-app-2.0.2.tgz Yii 2.0 需要 PHP 5.4.0 或以上版本支持。 解压至我的web目录 E:\wamp\www\ibrain\ 2,配置 config/web.php 第12行 'cookieValidationKey' => '123',//若你通过 Composer 安装,则此步骤会自动完成 config/db.php return [ 'class' => 'yii\db\Connection', 'dsn' => 'mysql:host=localhost;dbname=ibrain',//数据库配置 'username' => 'root', 'password' => '', 'charset' => 'utf8', 'tablePrefix'=>'ib_',//表前缀,默认没有的,自己加上 ]; ok, 跑 http://localhost/ibrain/web/index