[英]How to enable cURL programmatically?
I know the manual process uncomment the line 我知道手动处理会取消注释
;extension=php_curl.dll
But I need this enable using php code. 但我需要使用php代码启用此功能。 any idea? 任何想法?
This can only be done in the php.ini
file.这只能在 php.ini
文件中完成。
Edit: Apparently it can be done as the original poster stated. 编辑:显然,可以按照原始海报所述进行。
You might be looking for runkit_function_add()
您可能正在寻找runkit_function_add()
runkit_function_add('curl_init');
This is the opposite of what this user is trying to do in this thread: Programmatically disable specific PHP functions for testing 这与该用户试图在此线程中执行的操作相反:以编程方式禁用特定的PHP函数进行测试
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.