如何检查URL中是否有参数?
例如,如果字符串像这样,
form_page_add.php?parent_id=1
return true
但如果是这样的话,
form_page_add.php?
return nothing
谢谢。
编辑:
抱歉表述不够清晰,URL以字符串形式从表单提交。我会将该字符串存储在变量中。
if(isset($_POST['cfg_path'])) $cfg_path = trim($_POST['cfg_path']);
所以我需要检查这个变量$cfg_path
是否在其中包含参数。