php syntax error

藏色散人
Release: 2023-02-26 09:10:01
Original
3825 people have browsed it

php syntax error

php常见语法错误

一:缺少结束符引起的错误

1、代码

Copy after login

2、运行结果

Parse error: syntax error, unexpected '}', expecting ',' or ';' in D:\AppServ\www\test\22\1\index.php on line 5

二: 缺少单引号或双引号引起的错误

1、代码

Copy after login

2、运行结果

Parse error: syntax error, unexpected end of file, expecting variable (T_VARIABLE) or ${ (T_DOLLAR_OPEN_CURLY_BRACES) or {$ (T_CURLY_OPEN) in D:\AppServ\www\test\22\2\index.php on line 3
Copy after login

三: 缺少括号引起的错误

1、代码

"; } ?>
Copy after login

2、运行结果

Parse error: syntax error, unexpected end of file in D:\AppServ\www\test\22\3\index.php on line 9
Copy after login

四: 缺少变量标识符“$”引起的错误

1、代码

"; } ?>
Copy after login

2、运行结果

Parse error: syntax error, unexpected '++' (T_INC), expecting ')' in D:\AppServ\www\test\22\4\index.php on line 2
Copy after login

五: 语法错误特点

1、程序还没开始运行。

2、程序报的是Parse error错误。

更多PHP相关知识,请访问PHP中文网

The above is the detailed content of php syntax error. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!