简体   繁体   English

symfony2中curl的命名空间

[英]Namespace of curl in symfony2

What is the name space of curl in symfony2? symfony2中curl的名称空间是什么? It gives Fatal error: Call to undefined function curl_init() 它产生致命错误:调用未定义的函数curl_init()

似乎未启用curl支持-检查您的php.ini

PHP invoke CURL with simple functions. PHP用简单的函数调用CURL。 If you have enabled the 'php_curl' extension in your php.ini, you should have no trouble invoking curl normally. 如果您在php.ini中启用了“ php_curl”扩展名,则正常调用curl不会有任何麻烦。 But for certain configurations of PHP (I don't remember what) I was advised to use backslash before [like \\curl_init();] 但是对于某些PHP配置(我不记得是什么),建议我在[例如\\ curl_init();]之前使用反斜杠。

There are two php.ini files for bowser and for console. 有两个php.ini文件用于Bowser和控制台。 Make sure that you have enabled php_curl in both. 确保两者都启用了php_curl。 This happened to me when developing a console script. 开发控制台脚本时,这发生在我身上。 This must work for sure. 这必须肯定起作用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM