0
Recaptcha.create를 사용하는 Google Recaptcha가 있습니다. 그러나 어떤 이유에서든 Recaptcha.create는 로컬에서는 작동하지만 서버에서는 작동하지 않습니다. 여기 내 HTML과 JS가 있습니다.Recaptcha.create는 로컬에서는 작동하지만 서버에서는 작동하지 않습니다.
HTML<script type="text/javascript" src="http://www.google.com/recaptcha/api/js/recaptcha_ajax.js"></script>
<div id="recaptcha"></div>
<div id="fError">Waiting for input.</div>
<script src="/assets/js/upload-flash.js"></script>
그리고이 업로드-flash.js 여기
var captchaused = false;
function showRecaptcha() {
Recaptcha.create("6LfHYvgSAAAAAJ9G7fNYW5vwQkxUZDNSFhweiOPp", "recaptcha", {
theme: "clean",
callback: Recaptcha.focus_response_field});
}
function fileSelected() {
var file = document.getElementById('fileToUpload').files[0];
if (file) {
if(captchaused === false){
captchaused = true;
showRecaptcha();
} else {
Recaptcha.reload();
}
}
}
/*... and after this comes the uploading part. Removed it so that it doesn't become too long*/
이다는
지역 사진입니다
서버
브라우저의 콘솔에서 오류 메시지를 확인하십시오. – Cheery
@Cheery 아무 것도 없습니다. – Efekan
유효한 공개 키를 사용하고 있습니까? localhost에서 Google을 사용할 때 Google에서 확인하지 않습니다. '기본적으로 모든 키는 "localhost"(또는 "127.0.0.1")에서 작동하므로 로컬 컴퓨터에서 항상 개발하고 테스트 할 수 있습니다. " – Cheery