Skip to content

Instantly share code, notes, and snippets.

@atsea
Created February 25, 2015 18:19
Show Gist options
  • Save atsea/db59ba8dca7fa397997b to your computer and use it in GitHub Desktop.
Save atsea/db59ba8dca7fa397997b to your computer and use it in GitHub Desktop.
php: if url contains
/*
* If Url contains
* https://www.drupal.org/node/1214104
*/
$path = $_SERVER['REQUEST_URI'];
$find = 'design';
$pos = strpos(SERVICES_CONTAIN, $find);
if ($pos !== FALSE){
echo "current page: " . $find;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment