PHP http_build_url() 和 PECL 安装
我下载了一个使用 PHP 函数 http_build_url() 的 API。 每次我运行我的应用程序时,它都会说:
Fatal error: Call to undefined function http_build_url()
我做了一项研究,发现我应该安装 pecl_http 来运行该功能。 现在,我将它安装到我的系统中,顺便说一下,我使用的是Windows XP。我通过 CMD 安装这个,方法是转到我的 xampp/php 文件夹并运行以下命令:
pecl install pecl_http
不幸的是,我无法安装这个,因为它说:
ERROR: The DSP pecl_http.dsp does not exist.
这个有解决办法吗?或者任何我会让 http_build_url() 运行的想法。
I downloaded an API that uses this php function http_build_url().
Everytime I run my application it says:
Fatal error: Call to undefined function http_build_url()
I made a research and found out that I should install pecl_http to run that function.
Now, I installed it into my system, by the way, I used Windows XP. I install this one via CMD by goint to my xampp/php folder and running this command:
pecl install pecl_http
Unfortunately, I can't install this one because it says:
ERROR: The DSP pecl_http.dsp does not exist.
Is there a work around for this one? or any idea that I would make the http_build_url() run.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
有一个解决办法。如果您不想或只是不能使用 PECL,那么有一种方法,在 php.net 注释中提到,这是一种替代方法:
这里提到过: http://www.php.net/manual/de/function.http-build-url.php#96335
There is a work around. If you dont want or just cannot use PECL, then there is a method, mentioned on the php.net comments, which is a alternative method:
It was mentioned here: http://www.php.net/manual/de/function.http-build-url.php#96335
Github 版本 https://github.com/jakeasmith/http_build_url/blob/master/src/http_build_url。 php
“这个简单的库为没有 pecl_http 的环境提供了 http_build_url() 的功能。它旨在以各种方式模仿 pecl 函数的功能,并附带一整套针对原始函数和此包中的函数运行的测试。”
Github version https://github.com/jakeasmith/http_build_url/blob/master/src/http_build_url.php
"This simple library provides functionality for http_build_url() to environments without pecl_http. It aims to mimic the functionality of the pecl function in every way and ships with a full suite of tests that have been run against both the original function and the one in this package."