Home >Backend Development >PHP Tutorial >帮小弟我看上这代码是否规范,if语句判断

帮小弟我看上这代码是否规范,if语句判断

WBOY
WBOYOriginal
2016-06-13 11:05:50861browse

帮我看下这代码是否规范,if语句判断

<br />$hosturl=$_SERVER['PHP_SELF']; //获取当前url<br />if $hosturl="/index.php"   //如果URL等于/index.php,就输入body字段的内容<br />{<br />	$s['body'];<br />	exit;<br />}<br />



这代码哪里有问题吗?

------解决方案--------------------
有问题。 
1 if(xxx)  ,没有括号。
2 = 是赋值; == 是条件判断

Statement:
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