Jump to content

If URL contains something, do this


erme

Recommended Posts

Hi

 

Have this code which works great is the url is actually /welcome.html, but how can I adapt it so it works if the url contains /welcome.html ( eg /welcome.html?action=blah )

 

$uri = $_SERVER['REQUEST_URI'];
$root = $_SERVER['DOCUMENT_ROOT'];

if ($uri != '/welcome.html') {
     include ''.$root.'/inc/aside.php';
}

 

Link to comment
https://forums.phpfreaks.com/topic/266272-if-url-contains-something-do-this/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.