note 74530 deleted from function.realpath by colder

From: Date: Mon, 16 Apr 2007 16:49:08 +0000
Subject: note 74530 deleted from function.realpath by colder
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-125447@lists.php.net to get a copy of this message
Note Submitter: aszlig Reason: wrooooooooong ---- this won't traverse preceding directories, but it will remove all unnecessary things like multiple slashes and dot-shlashes: <?php preg_replace( '!((^|/+)\.)*/*(?=((/\.?)*$)|/)!', '', $path ); ?>

« previous php.notes (#125447) next »