note 18707 added to function.ereg-replace

From: Date: Fri, 01 Feb 2002 09:51:31 +0000
Subject: note 18707 added to function.ereg-replace
Groups: php.notes 
Request: Send a blank email to php-notes+get-26121@lists.php.net to get a copy of this message
If anybody wants to strip the domain name and protocol from url and get just the path on the server, this should do it: $url = "http://www.sonce.net/index.php"; echo "Url: ".$url; $new = eregi_replace("^(.{2,6}://)?[^/]*/", "", $url); echo "Path: ".$new; -- http://www.php.net/manual/en/function.ereg-replace.php http://master.php.net/manage/user-notes.php?action=edit+18707 http://master.php.net/manage/user-notes.php?action=delete+18707 http://master.php.net/manage/user-notes.php?action=reject+18707

« previous php.notes (#26121) next »