$hosturl=$_SERVER['PHP_SELF']; //获取当前url
if $hosturl="/index.php" //如果URL等于/index.php,就输入body字段的内容
{
$s['body'];
exit;
}
这代码哪里有问题吗?
------解决方案--------------------
有问题。
1 if(xxx) ,没有括号。
2 = 是赋值; == 是条件判断
$hosturl=$_SERVER['PHP_SELF']; //获取当前url
if $hosturl="/index.php" //如果URL等于/index.php,就输入body字段的内容
{
$s['body'];
exit;
}