如果 URL 末尾存在“?something”,请执行某些操作


Do something if "?something" is present at the end of a URL

我想让它在 url 的末尾有一个?no,那么就不会发生某些事情。但是,如果 url 末尾没有任何内容,那么确实会发生一些事情。我该怎么做?

使用

if (!isset($_REQUEST['no'])) {
//something happen
} else {
//do nothing
}