更新时间:2022-01-29 22:37:02
尝试类似的方法.第一行建立您的URL,其余行检查其是否包含单词"car".
Try something like this. The first row builds your URL and the rest check if it contains the word "car".
$url = 'http://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];
if (strpos($url,'car') !== false) {
echo 'Car exists.';
} else {
echo 'No cars.';
}