需要帮助安装 yii2 应用程序高级模板 [英] Need help to install yii2 application advanced template

查看:26
本文介绍了需要帮助安装 yii2 应用程序高级模板的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I'm new to Yii2, now I'm trying to install yii2 application advanced template.

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

I did follow these steps:

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

2 - 遵循入门指南:

2 - Follow GETTING STARTED guide:

 + 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 

  • 我按照以下路径检查了供应商"目录:F:\Server\UniServerZ\www\yii2\vendor但它是空的.
  • 那么我应该怎么做才能修复这个错误并安装 yii2 应用程序高级模板?

    So what should I do to fix this error and install yii2 application advanced template?

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

    (My Uniform Server runs PHP5.4)

    推荐答案

    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

    Note: If the above fails due to readfile, use the http url or enable php_openssl.dll in php.ini

    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 2.0.0-beta

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

    php 初始化

    php yii migrate

    这篇关于需要帮助安装 yii2 应用程序高级模板的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆