웹 사이트 URL에 "="또는 "?"기호가 있는지 확인하는 코드를 작성하려고합니다. URL에PHP 정규식을 찾으십니까? 또는 =가 작동하지 않습니다.
나는 발견한다 $ 웹 사이트 (예를 들어 www.smith.com?page=1)의 URL을 가지고 있지만 그냥 일치하는 경우 다음과 같은 코드
$cleanurl_text = "You appear to have a clean url structure.";
$regex = '/=/i';
if (preg_match($regex, $website))
{
$cleanurl_text = "You do not appear to have a clean url structure.";
}
$regex = '/?/i';
if (preg_match($regex, $website))
{
$cleanurl_text = "You do not appear to have a clean url structure.";
}
downvoter에게, 왜 이것이 downvote 자격이 있다고 생각하는지 설명해주십시오. –