Yii+nginx+linux+php-fpm 搭建环境出现错误 [ 2.0 版本 ]
错误日志:
2015/01/29 18:45:10 [error] 14499#0: *104 FastCGI sent in stderr: "PHP message: PHP Parse error: syntax error, unexpected '[', expecting ')' in /opt/webroot/dianshangwebroot/web/vendor/yiisoft/yii2/Yii.php on line 25" while reading response header from upstream, client: 123.160.185.237, server: www.domain.com, request: "GET / HTTP/1.1", upstream: "fastcgi://127.0.0.1:9999", host: "www.domain.com"
Yii文件代码没有错误:
<?php
/**
* Yii bootstrap file.
*
* @link http://www.yiiframework.com/
* @copyright Copyright (c) 2008 Yii Software LLC
* @license http://www.yiiframework.com/license/
*/
require(__DIR__ . '/BaseYii.php');
/**
* Yii is a helper class serving common framework functionalities.
*
* It extends from [[\yii\BaseYii]] which provides the actual implementation.
* By writing your own Yii class, you can customize some functionalities of [[\yii\BaseYii]].
*
* @author Qiang Xue <qiang.xue@gmail.com>
* @since 2.0
*/
class Yii extends \yii\BaseYii
{
}
spl_autoload_register(['Yii', 'autoload'], true, true);
Yii::$classMap = include(__DIR__ . '/classes.php');
Yii::$container = new yii\di\Container;
baoniu 补充于 2015-01-30 11:19
多谢,原来如此!我刚装了一个php6好像可以了……
baoniu
注册时间:2015-01-29
最后登录:2015-01-30
在线时长:0小时3分
最后登录:2015-01-30
在线时长:0小时3分
- 粉丝0
- 金钱5
- 威望0
- 积分5