Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/symfony/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/url/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
替换symfony中的架构_Symfony_Url - Fatal编程技术网

替换symfony中的架构

替换symfony中的架构,symfony,url,Symfony,Url,symfony2中是否有可能从url创建类似some.url的内容(没有模式和斜杠) 最简单的解决方案是str_replace([“http://”,“https://”,“https://”,“https://”,“https://”,“http://”,“http://”,“http://”,“http://”,“http://”,“http://”,“http://”,“http://”,“http://”,“http://”,“http://”,“http://”,“http://”,“

symfony2中是否有可能从url创建类似some.url的内容(没有模式和斜杠)


最简单的解决方案是str_replace([“http://”,“https://”,“https://”,“https://”,“https://”,“http://”,“http://”,“http://”,“http://”,“http://”,“http://”,“http://”,“http://”,“http://”,“http://”,“http://”,“http://”,“http://”,“http:;但是我不喜欢它(

有内置的php函数:


内置php函数:


thanx)我忘了这个)不客气,你能接受我的回答吗?thanx)我忘了这个)不客气,你能接受我的回答吗。
$domain = parse_url($url, PHP_URL_HOST);