ereg_replace question
| From: | Todd Cary | Date: | Wed, 11 Jun 2003 17:12:37 +0000 |
| Subject: | ereg_replace question | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-151108@lists.php.net to get a copy of this message | ||
I have a string,
D:\Htdocs\gilardi\barcode\php\testwrite.php
from
$fullpath = $HTTP_SERVER_VARS[PATH_TRANSLATED];
I want to remove the "testwrite.php" leaving
D:\Htdocs\gilardi\barcode\php\
This does not work
$fullpath = $HTTP_SERVER_VARS[PATH_TRANSLATED];
$fullpath = ereg_replace("\\[^\\]+$","",$fullpath) . '\\';
What have I missed?
Todd
--