我在第77行的/vendor/guzzlehttp/psr7/src/functions.php函数中的laravel中出错 [英] i have error in laravel on function /vendor/guzzlehttp/psr7/src/functions.php on line 77

查看:282
本文介绍了我在第77行的/vendor/guzzlehttp/psr7/src/functions.php函数中的laravel中出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在共享服务器上上传laravel 4文件 然后我看到这个错误.

I upload laravel 4 files on shared server and then i see this error.

解析错误:语法错误,in中出现意外的'['. /vendor/guzzlehttp/psr7/src/functions.php,第77行

Parse error: syntax error, unexpected '[' in . /vendor/guzzlehttp/psr7/src/functions.php on line 77

第77行:

函数stream_for($ resource ='',数组$ options = [])

function stream_for($resource = '', array $options = [])

推荐答案

短数组语法 [] 已在PHP 5.4中添加,因此我想您正在共享平台上运行某些旧版本的PHP服务器.通常用 array()替换 [] 会有所帮助,但是这里是外部供应商软件包,因此不建议修改代码,因为当供应商软件包被覆盖时,更改将被覆盖更新.除此之外,解决此问题的唯一方法是使用更新版本的PHP.

Short array syntax [] was added in PHP 5.4, so I guess you're running some older version of PHP on the shared server. Normally replacing [] with array() would help, but here it is an external vendor package so it's not advised to modify the code as changes would be overwritten when vendor package is updated. Other than that the only way to fix that issue is to use newer version of PHP.

这篇关于我在第77行的/vendor/guzzlehttp/psr7/src/functions.php函数中的laravel中出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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