"ftp.example.com", "path" => "files/current/", "quer">
当前位置:Gxlcms > PHP教程 > 为什么小弟我的http_build_url()函数会报错

为什么小弟我的http_build_url()函数会报错

时间:2021-07-01 10:21:17 帮助过:26人阅读

为什么我的http_build_url()函数会报错
echo http_build_url("http://user@www.example.com/pub/index.php?a=b#files",
array(
"scheme" => "ftp",
"host" => "ftp.example.com",
"path" => "files/current/",
"query" => "a=c"
),
HTTP_URL_STRIP_AUTH | HTTP_URL_JOIN_PATH | HTTP_URL_JOIN_QUERY | HTTP_URL_STRIP_FRAGMENT
);
?>
手册中写的是无需任何配置,直接使用即可,为什么我的会报错Fatal error: Call to undefined function http_build_url() in E:\wamp\www\sometimeExa\bulid_url.php on line 2

------解决方案--------------------
(PECL pecl_http >= 0.21.0)
------解决方案--------------------
http_build_url
(PECL pecl_http:0.21.0-1.5.5)

------解决方案--------------------
http://pecl.php.com/ *nix

http://downloads.php.com/pierre/ windows
------解决方案--------------------
http_build_url 函数隶属于 pecl_http 扩展
PECL 系列的扩展,不属于 php 的标准配置系列,不由 php 开发组织维护
如无特殊需要,尽可能的不使用 PECL 扩展。如果使用了,则需密切关注开发者的网站,以便及时更新和消除 BUG

人气教程排行