use*_*572 0 php string url search
我有这个网址:http://itutormaths.hub/home/hub/6/hello/world我想抓住你好和世界.
我该怎么做?
谢谢!
<?php
$url = 'http://itutormaths.hub/home/hub/6/hello/world';
$pathParts = explode( '/', parse_url($url, PHP_URL_PATH) );
$lastParts = array( array_pop($pathParts), array_pop($pathParts) );
var_dump($lastParts);
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
244 次 |
| 最近记录: |