I have a URL string like this
////192.168.1.247/htdocs/20061/DC101_20061/DEN/Homeworks/Incoming/reportee.reportee.reportee
I only want the part after the IP address like this
htdocs/20061/DC101_20061/DEN/Homeworks/Incoming/reportee.reportee.reportee
I tried using a parse_url to break it down but it doesnt recognise IP. So can someone help me with this. Any help will be greatly appreciated. Thanks
[Solved] splitting a URL
Moderator: General Moderators
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
it would if that were a qualified URL. That appears to be a Windows networking name.
try something like this
try something like this
Code: Select all
$path = preg_replace('#^.+?[^/] /#','',$url);I used the following code
The output it gave was
////192.168.1.247/htdocs/20061/DC101_20061/DEN/Homeworks/Incoming/reportee.reportee.reportee
I guess soemthing is wrong. Thx
Code: Select all
$url = "////192.168.1.247/htdocs/20061/DC101_20061/DEN/Homeworks/Incoming/reportee.reportee.reportee";
$path = preg_replace('#^.+?[^/] /#','',$url);
echo $path;////192.168.1.247/htdocs/20061/DC101_20061/DEN/Homeworks/Incoming/reportee.reportee.reportee
I guess soemthing is wrong. Thx