1
我需要將一個URL拆分成一個數組。Preg_split模式來拆分URL像parseURL
實施例:
https://demoURL:44355/test/new/demo.html/#ContactPerson?language=EN
到
array(
'http:/',
'demoURL:44355',
'test/new/demo.html/#ContactPerson?language=EN'
)
與preg_split
。
你嘗試過什麼? http://stackoverflow.com/questions/11480763/how-to-get-parameters-from-this-url-string – MarZab
爲什麼不使用'parse_url'函數? http://php.net/manual/en/function.parse-url.php – GeorgeQ
改進格式化一點點 – gofr1