Blogger Information
Blog 28
fans 0
comment 0
visits 65354
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
访问php搭建的本地服务器站点时报错Syntax error,unexpected ‘:’,expecting ‘{’ in……vendor\guzzlehttp\guzzle\src\functions.php
蒸蒸
Original
1244 people have browsed it

访问php搭建的本地服务器站点时报错Syntax error,unexpected ‘:’,expecting ‘{’ in……vendor\guzzlehttp\guzzle\src\functions.php

可见是guzzle有问题,查看guzzle的配置文件(目录vendor\guzzlehttp\guzzle\composer.json),发现当前安装的guzzle要求php版本为7.2.5或者8.0

而在phpstudy中我选择的php版本是5.6.27,所以确认是php版本的问题
点击phpstudy的切换版本按钮,将php的版本切换为php-7

由于php 7运行需要安装32位的visual 14,我的电脑上没有安装,所以第一次没有切换成功

下载并安装32位的vc14,安装过程中遇到另一个问题,提示已经安装了另一个版本的vc14,需要先卸载,查看控制面板发现确实安装的有另一个版本的vc14,将其卸载后重新安装刚下载的32位vc14,成功安装
再次点击phpstudy的切换版本按钮,成功切换为php-7

之后可成功在浏览器访问站点

Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post