需要帮助来安装yii2应用程序高级模板

use*_*078 6 php yii2

我是Yii2的新用户,现在我正在尝试安装yii2应用程序高级模板.

我确实按照以下步骤操作:

1 - 从https://github.com/yiisoft/yii2-app-advanced下载yii2-app-advanced zip文件

2 - 按照入门指南:

 + I'm using Uniform Zero Server (installed in F disk with the path "F:\Server\UniServerZ\www") ok.
 + I creted new folder with name "yii2" in the "www" directory ("F:\Server\UniServerZ\www\yii2")
 + I extracted zip file yii2-app-advanced into "yii2" folder (Every source of yii2-app-advanced now in "yii2" folder so it is the root directory of yii2-app-advanced)
 + Click init.bat file to run "init" and select (0 - Developer mode) and type "yes" to confirm. Done
 + And then I click the yii.bat file, but nothing happened.
 + I tried use this url : localhost/yii2/backend/web/                
   And I get this Error:
   Fatal error: require(): Failed opening required 'F:\Server\UniServerZ\www\yii2\backend\web/../../vendor/autoload.php' (include_path='.;F:/Server/UniServerZ/home/us_pear/PEAR') in F:\Server\UniServerZ\www\yii2\backend\web\index.php on line 5
                   or url : localhost/yii2/frontend/web/ 
   And I get this Error too:
   Fatal error: require(): Failed opening required 'F:\Server\UniServerZ\www\yii2\frontend\web/../../vendor/autoload.php' (include_path='.;F:/Server/UniServerZ/home/us_pear/PEAR') in F:\Server\UniServerZ\www\yii2\frontend\web\index.php on line 5 
Run Code Online (Sandbox Code Playgroud)
  • 我检查了"供应商"目录,按照以下路径:F:\ Server\UniServerZ\www\yii2\vendor但它是空的.

那么我该怎么做才能解决这个错误并安装yii2应用程序高级模板?

(我的统一服务器运行PHP5.4)

Bha*_*han 8

Yii2安装以下命令:

(1)首先安装Composer(LINUX):

本地:

curl -sS https://getcomposer.org/installer | php

要么

(1)首先安装Composer(WINDOWS):

C:\Users\username>cd C:\bin

C:\bin>php -r "readfile('https://getcomposer.org/installer');" | php

注意:如果由于readfile导致上述操作失败,请使用http url或在php.ini中启用php_openssl.dll

C:\bin>echo @php "%~dp0composer.phar" %*>composer.bat

C:\Users\username>composer -V

作曲家版本27d8904


(2)Yii2框架在线下载:

基本应用:

php composer.phar create-project yiisoft/yii2-app-basic basic 2.0.0-beta

高级应用:

php composer.phar create-project yiisoft/yii2-app-advanced advanced 2.0.0-beta


(3)其他应用程序设置命令:

php init

php yii migrate


Ole*_*sur 3

如果您使用的是 Linux,请转到下载的项目并在终端中键入(如果您有 Composer):

php 作曲家.phar 安装

如果没有安装 Composer,请访问https://getcomposer.org/download/之后,yii2 框架和其他扩展将安装在供应商目录中。这应该可以解决问题