Home  >  Article  >  Backend Development  >  为什么小弟我的http_build_url()函数会报错

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

WBOY
WBOYOriginal
2016-06-13 13:17:492095browse

为什么我的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.net/ *nix

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

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn