note 42745 deleted from function.stripslashes by aidan
| From: | aidan@php.net | Date: | Sun, 29 Aug 2004 10:22:12 +0000 |
| Subject: | note 42745 deleted from function.stripslashes by aidan | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-75528@lists.php.net to get a copy of this message | ||
Note Submitter: ffortier at journaldequebec dot com
----
Hi,
The function stripslashes don't work very well with windows path. There's a function that
strip any double slashes to alway display clean path.
//By Frederic Fortier
function clean_path($ch) {
do {
$pos = strpos($ch, chr(92) . chr(92));
if ($pos != false) {
$ch = substr_replace($ch, chr(92), $pos, 2);
}
} while ($pos != false);
return $ch;
}