yii报错

首先用根目录下面的文件requirements.php检查配置

错误一 Invalid Parameter – yii\base\InvalidParamExceptionThe file or directory to be published does not exist: E:\pengzz\UPUPW_NGINX_PHP5.3.28_UP-N3.5\upupw\htdocs\yii\basic\vendor\bower/jquery/dist

解决方法:

cd /yii/vendor/bower;
sudo cp -r bower-asset/jquery ./jquery;
sudo cp -r bower-asset/bootstrap ./bootstrap;

错误二 ../config/main-local.php): failed to open stream: No such file 

复制E:\pengzz\UPUPW_NGINX_PHP5.3.28_UP-N3.5\upupw\htdocs\yii\advanced\environments\dev\backend\config的我文件到E:\pengzz\UPUPW_NGINX_PHP5.3.28_UP-N3.5\upupw\htdocs\yii\advanced\backend\config

错误三 YII2.0 如何去掉URL中的index.php

为 config目录的web.php 增加配置项 urlManager,代码:

'urlManager' => [ 'class' => 'yii\web\UrlManager', // Disable index.php 'showScriptName' => false, // Disable r= routes 'enablePrettyUrl' => true,

       'rules' => array( ), ],

参考http://www.bsourcecode.com/yiiframework2/removing-index-php-from-url-in-yiiframework-2-0/

参考文件:http://blog.csdn.net/ybygjy/article/details/40832637

你可能感兴趣的:(yii报错)