Date: 06/03/05 (Java Web) Keywords: php Without much ado, I present the script. It handles http and https URL's and should work across platforms and configurations (like using htaccess for clean url's etc.). To understand more about the issues involved read - Understanding $_SERVER[’PHP_SELF’], $PHP_SELF, $_SERVER[’REQUEST_URI’] and $_SERVER[’SCRIPT_NAME’] in PHP and when to use what $_SERVER['FULL_URL'] = 'http'; $script_name = ''; if(isset($_SERVER['REQUEST_URI'])) { [...]
|