我是运行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)下载了文件,并且只是使用了文件夹/文件名称.我的验证文件上面有一个文件夹,但为了以防万一,我还尝试将文件复制到与验证脚本相同的文件夹中.
有任何想法吗?