小编bub*_*din的帖子

Google ReCaptcha 2致命错误:找不到"ReCaptcha\RequestMethod\Post"类

我是运行wamp的本地计算机上的google recaptcha v2.一切看起来都很好,除了它应该验证表格时它一直在死

我收到这个错误:

Fatal error: Class 'ReCaptcha\RequestMethod\Post' not found in C:\wamp\www\php\contactForm\Captcha\ReCaptcha.php on line 73
Run Code Online (Sandbox Code Playgroud)

我几乎从谷歌复制/粘贴了示例代码:

if (!empty($human)) {
    require_once('Captcha\ReCaptcha.php');
    $recaptcha = new \ReCaptcha\ReCaptcha($secret);
    $resp = $recaptcha->verify($human, $remoteIp);
   if ($resp->isSuccess()) {
    // verified!
Run Code Online (Sandbox Code Playgroud)

我已经从google github(https://github.com/google/recaptcha/tree/master/src/ReCaptcha)下载了文件,并且只是使用了文件夹/文件名称.我的验证文件上面有一个文件夹,但为了以防万一,我还尝试将文件复制到与验证脚本相同的文件夹中.

有任何想法吗?

php wampserver recaptcha

0
推荐指数
2
解决办法
7719
查看次数

标签 统计

php ×1

recaptcha ×1

wampserver ×1