开发者

CURL problem in php for live urls

开发者 https://www.devze.com 2022-12-17 00:25 出处:网络
I have have p开发者_C百科roblem while using the cURL in my php script. Wheni used it its given me below error.

I have have p开发者_C百科roblem while using the cURL in my php script.

Wheni used it its given me below error.

Fatal error: Call to undefined function curl_init()

This problem is for both local and live url .

But when i move my code to live its working fine.

I have contact n/w admin but its say that there is no such restriction in firewall.

I am not getting the problem.

Thanks

Avinash


It sounds like your code is working when you move it to a production environment, but it's not working in your development environment. It's not a problem with your code... it sounds like cURL is not installed in your dev environment.

cURL is a library that you'll need to specifically install in order to use. If your local environment is a linux machine, you need the php5-curl package installed.

If your local environment is a Windows machine, you can re-run the PHP installer to add it. Choose Change, and then at the "Choose Items" screen, expand the Extensions and choose "Will be installed on local hard drive" from next to the Curl option (see image).

CURL problem in php for live urls

Make sure that cURL extension is also enabled in your php.ini file after it's been installed.


You might want to ask the server support team whether curl extension is enabled on their server or not. It may be that it is enabled on your local server but not online.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号