note 107860 added to function.dirname

From: Date: Sat, 10 Mar 2012 17:33:18 +0000
Subject: note 107860 added to function.dirname
Groups: php.notes 
Request: Send a blank email to php-notes+get-186579@lists.php.net to get a copy of this message
If you want to get the parent parent directory of your script, you can use this: <?php //Example script path: home/content/en/script.php $parentparentdir=basename(dirname(dirname(__FILE__))); echo $parentparentdir; //will output 'content' ?> ---- Server IP: 212.69.189.114 Probable Submitter: 80.109.214.189 ---- Manual Page -- http://www.php.net/manual/en/function.dirname.php Edit -- https://master.php.net/note/edit/107860 Del: integrated -- https://master.php.net/note/delete/107860/integrated Del: useless -- https://master.php.net/note/delete/107860/useless Del: bad code -- https://master.php.net/note/delete/107860/bad+code Del: spam -- https://master.php.net/note/delete/107860/spam Del: non-english -- https://master.php.net/note/delete/107860/non-english Del: in docs -- https://master.php.net/note/delete/107860/in+docs Del: other reasons-- https://master.php.net/note/delete/107860 Reject -- https://master.php.net/note/reject/107860 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#186579) next »