安装 Yii 2 演示应用程序 [英] Installing Yii 2 demo application

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

问题描述

我正在尝试安装 yii 2 并运行基本或高级应用程序.

i am trying to install yii 2 and to run the basic or advanced application.

我已经尝试了这里给出的步骤设置 Yii2 的预览 这样做.

i have tried the steps given here Setting up preview of Yii2 to do this.

我遵循的步骤,

1 - Installed the composer
2 - Use composer to install the app alongwith dependencies(Yii): php path/to/composer.phar create-project --stability=dev yiisoft/yii2-app-basic my_yii2_trial
3 - Access app from http://localhost/my_yii2_trial/web

问题是,我收到此语法错误.

The problem is, i am getting this syntax error.

Parse error: syntax error, unexpected '[', expecting ')' in D:\xampp\htdocs\my_yii2_trial\vendor\yiisoft\yii2\yii\Yii.php on line 25 

任何机构都可以帮助解决这个问题吗

can any body help to resolver this issue pls

推荐答案

Yii2 已经开始使用 PHP 5.4'■ 短数组语法.由于以下原因,您的错误逐渐增加:

Yii2 has started using PHP 5.4's Short array syntax. Your error creeps up because of:

spl_autoload_register(['Yii', 'autoload'], true, true);

Yii.php 中,这是新的短数组句法.正如您已经发现的,您现在需要安装 PHP 5.4 才能运行 Yii2 应用程序.

in Yii.php, which is the new short array syntax. As you have already figured out, you need to install PHP 5.4 now to run Yii2 apps.

对短数组语法进行更改的提交.

已更改的文档和作曲家详细信息.

决定迁移到 PHP 5.4 的讨论.

由于 Yii2 仍在大力开发中,其需求也在发生变化.所以安装前请务必仔细阅读自述文件.

As Yii2 is still in heavy development, its requirements are also changing. So be sure to read the readme thoroughly before installing.

另请参阅PHP 5.4 的向后不兼容更改列表,对您现有的代码进行更改.

See also the Backward Incompatible changes list for PHP 5.4, to make changes to your existing code.

这篇关于安装 Yii 2 演示应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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