Focus on cloud service provider activities
Notes on website operation and maintenance

Record of solving "Parse error: syntax error, unexpected" error problem

Today, when Lao Zuo tested the source code of online SpeedTest program in the server, the installation was relatively simple. As long as it was based on the WEB environment, he could drop the program and download it directly from GITHUB. Here, I randomly found a test server at hand, but found an error message after installation. Other information is correct, but the current IP address cannot be obtained.

Here we see the error "IP Address: Parse error: syntax error , unexpected '[', expecting ')' in...../speedtest/getIP. php on line 24 ". The program should be OK, because there are official cases that can be opened and used. It may be a problem with the current PHP version, because PHP can only be PHP 5.3 when debugging a program at the same time. It is estimated that the version is lower, so I upgraded the PHP version to PHP 7.0.

Finally, the problem must be solved in this way.

Domain name host preferential information push QQ group: six hundred and twenty-seven million seven hundred and seventy-five thousand four hundred and seventy-seven Get preferential promotion from merchants.
Like( five )
Do not reprint without permission: Lao Zuo's Notes » Record of solving "Parse error: syntax error, unexpected" error problem


Scan the code to follow the official account

Get more news about webmaster circle!
Entrepreneurship, operation and new knowledge