下面是示例代码:
$currentPath = $_SERVER['REQUEST_URI']; // 获取当前路径 $targetPath = '/path/to/somewhere'; // 目标路径 if ($currentPath === $targetPath) { echo '当前路径与目标路径相同!'; } else { echo '当前路径不等于目标路径!'; }
copy © 2025 星澜网络 All Rights Reserved
备案号:鲁ICP备2023015769号