note 74621 added to function.dirname

From: Date: Fri, 20 Apr 2007 14:39:33 +0000
Subject: note 74621 added to function.dirname
Groups: php.notes 
Request: Send a blank email to php-notes+get-125650@lists.php.net to get a copy of this message
to gain the current directory path just type <?php $proto="http://"; $ser= $_SERVER['HTTP_HOST'].dirname($_SERVER['PHP_SELF']); echo $proto.$ser ?> e.g if http_host= ahsan.com if php_self = /email/ then the output will be http://ahsan.com/email/ if we add ."/Home/"; after ['PHP_SELF'] i.e; $_SERVER['HTTP_HOST'].dirname($_SERVER['PHP_SELF'])."/Home/; then the out put will be http://ahsan.com/email/Home/ trailing slashes can be removed.... According to our choices ---- Server IP: 69.147.83.197 Probable Submitter: 202.163.65.210 ---- Manual Page -- http://www.php.net/manual/en/function.dirname.php Edit -- https://master.php.net/note/edit/74621 Del: integrated -- https://master.php.net/note/delete/74621/integrated Del: useless -- https://master.php.net/note/delete/74621/useless Del: bad code -- https://master.php.net/note/delete/74621/bad+code Del: spam -- https://master.php.net/note/delete/74621/spam Del: non-english -- https://master.php.net/note/delete/74621/non-english Del: in docs -- https://master.php.net/note/delete/74621/in+docs Del: other reasons-- https://master.php.net/note/delete/74621 Reject -- https://master.php.net/note/reject/74621 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#125650) next »