See also: /php/page-control/get-page-uri-url Getting Site URL
Category: URL’s
Detecting Name Of Page Include A File
//include_once('includes/my_include_file.php'); //Get the name of the file calling this include $calling_file = end(explode('/', $_SERVER[‘PHP_SELF’])); switch ($calling_file) { case 'some_file.php':
Site Root
You can’t do this in php: require_once ‘/s3_settings.php’; So instead do this: require_once($_SERVER[‘DOCUMENT_ROOT’] . ‘/s3_settings.php’);
Getting URL Arguments
Get an argument GET only using $_GET POST only using $POST GET or POST using $_REQUEST Did GET or POST occur Example GET URL Start with an ‘?’, then separate other values with an ‘&’ To read: Example For POST Parameters Sanitise Them!!! htmlentities() converts things like < > ” \ etc into HTML strings like […]