小编use*_*374的帖子

如何检查字段是否为空?

所以我在PHP中使用了这个代码,并且由于某些我不知道的原因它不能正常工作:

if(!empty($ccle))
{
    header("Location: http://google.com");
}

else
{
    header("Location: http://yahoo.com");
}
Run Code Online (Sandbox Code Playgroud)

我想要的是:如果"ccle"字段为空,那么转到google.com或者如果"ccle"字段不为空(哪里是值),那么转到yahoo.com

如何做到这一点?

html php redirect

3
推荐指数
1
解决办法
161
查看次数

标签 统计

html ×1

php ×1

redirect ×1