This question has already been answered:
- Parse the URL with parse_url 1 answer
Have url
_http: //domen.com/name
It is necessary to extract part:
_http: //domen.com/ name
Help create a regular expression.
This question has already been answered:
Have url
_http: //domen.com/name
It is necessary to extract part:
_http: //domen.com/ name
Help create a regular expression.
A similar question was asked earlier and an answer has already been received. If the answers provided are not exhaustive, please ask a new question .
Instead of a regular expression, it is better to use the parse_url function. It will be much easier than messing with regular expressions.
To get the path from the URL, you can use the following code:
echo(parse_url($url, PHP_URL_PATH)); Source: https://ru.stackoverflow.com/questions/446450/
All Articles