xxxxxxxxxx
function url_is(string $path)
{
// Setup our regex to allow wildcards
$path = '/' . trim(str_replace('*', '(\S)*', $path), '/ ');
$currentPath = '/' . trim(uri_string(true), '/ ');
return (bool) preg_match("|^{$path}$|", $currentPath, $matches);
}
//https:domain.com/app/myfile
if(url_is('myfile'))
{
true;
}else{
false;
}