note 105519 deleted from function.dirname by danbrown

From: Date: Wed, 24 Aug 2011 13:37:52 +0000
Subject: note 105519 deleted from function.dirname by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-182697@lists.php.net to get a copy of this message
Note Submitter: nelson dot salvador at gmail dot com ---- $url = ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on')) ? 'https://' : 'http://'; $url .= $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']); $containing_dir = basename(dirname(__FILE__)); $variable = str_replace($containing_dir,'',$url); echo "$variable"; http://www.domain.com/scriptname/install_folder/ Result: http://www.domain.com/scriptname/

« previous php.notes (#182697) next »