我需要在我的EasyPhp环境中启用pdo_mysql,所以我去了php.ini文件并取消注释以下行:
extension=php_pdo_mysql.dll
Run Code Online (Sandbox Code Playgroud)
不幸的是我仍然有同样的问题.我正在使用CLI,所以我想我需要找到CLI使用的php.ini文件.我该怎么找到它?
嗨,我在POST请求中尝试PHP Post Request,认为它可能对我有用,我的代码如下所示
$sub_req_url = "http://localhost/index1.php";
$ch = curl_init($sub_req_url);
$encoded = '';
// include GET as well as POST variables; your needs may vary.
foreach($_GET as $name => $value) {
$encoded .= urlencode($name).'='.urlencode($value).'&';
}
foreach($_POST as $name => $value) {
$encoded .= urlencode($name).'='.urlencode($value).'&';
}
// chop off last ampersand
$encoded = substr($encoded, 0, strlen($encoded)-1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $encoded);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_POST, 1);
curl_exec($ch);
curl_close($ch);
Run Code Online (Sandbox Code Playgroud)
形成index.php文件和index2.php是同一目录中的另一个文件,当我打开页面时,我的error.log文件中出现以下错误
[Sat Dec 18 15:24:53 2010] [error] [client ::1] PHP Fatal …Run Code Online (Sandbox Code Playgroud) 当我尝试使用wamp服务器在Windows 7中实现google和facebook身份验证时,我遇到了以下错误.
致命错误:在第273行的E:\ wamp\www\mysite\protected\extensions\eauth\EAuthServiceBase.php中调用未定义的函数curl_init()
我在用,
我也启用了php_curl模块.我检查了php.ini进行确认,它被取消注释如下.
;extension=php_bz2.dll
extension=php_curl.dll
;extension=php_dba.dll
Run Code Online (Sandbox Code Playgroud)
该代码在ubuntu中使用xampp,但不在Windows中的wamp中.我做了我能找到的一切.我已经尝试根据此线程的注释替换php_curl.dll,调用未定义的函数curl_init() - 使用WAMP
我的phpinfo()如下所示.

我在分区E:\中安装了wamp,但"配置文件(php.ini)路径"似乎不同,它是C:\ Windows.
请帮我解决这个问题.
我需要使用这个docum打印curl版本:
<?PHP echo curl_version('version');?>
Run Code Online (Sandbox Code Playgroud)
但我的输出是空的!我怎么能打印卷曲的版本号?
为什么我总是收到未捕获的错误:调用未定义的函数 curl_init()。我在 php.ini 中设置了 extension:php_curl 并安装了 php-curl。但不工作。. 大家帮帮我吗?