게시판 | 그누보드5에서 주소에 www 붙이면 자동등록방지(캡차)가 안보이는 경우
페이지 정보
작성자 YJNet 작성일14-07-11 10:11 조회21,103회 댓글0건본문
그누보드5에서 홈페이지 주소에 test.com 으로 하면 캡차가 정상적으로 보이는데
www.test.com 처럼 www를 붙이면 캡차가 안보이는 경우 해결방법입니다.
/common.php 파일에서
$result['url'] = $http.$_SERVER['SERVER_NAME'].$port.$user.$root;
위의 줄을 찾아서 아래 줄로 대체
위의 줄을 찾아서 아래 줄로 대체
$result['url'] = $http.$_SERVER['HTTP_HOST'].$port.$user.$root;
function g5_path()
{
$result['path'] = str_replace('\\', '/', dirname(__FILE__));
$tilde_remove = preg_replace('/^\/\~[^\/]+(.*)$/', '$1', $_SERVER['SCRIPT_NAME']);
$document_root = str_replace($tilde_remove, '', $_SERVER['SCRIPT_FILENAME']);
$root = str_replace($document_root, '', $result['path']);
$port = $_SERVER['SERVER_PORT'] != 80 ? ':'.$_SERVER['SERVER_PORT'] : '';
$http = 'http' . ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS']=='on') ? 's' : '') . '://';
$user = str_replace(str_replace($document_root, '', $_SERVER['SCRIPT_FILENAME']), '', $_SERVER['SCRIPT_NAME']);
$result['url'] = $http.$_SERVER['SERVER_NAME'].$port.$user.$root;
return $result;
}
{
$result['path'] = str_replace('\\', '/', dirname(__FILE__));
$tilde_remove = preg_replace('/^\/\~[^\/]+(.*)$/', '$1', $_SERVER['SCRIPT_NAME']);
$document_root = str_replace($tilde_remove, '', $_SERVER['SCRIPT_FILENAME']);
$root = str_replace($document_root, '', $result['path']);
$port = $_SERVER['SERVER_PORT'] != 80 ? ':'.$_SERVER['SERVER_PORT'] : '';
$http = 'http' . ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS']=='on') ? 's' : '') . '://';
$user = str_replace(str_replace($document_root, '', $_SERVER['SCRIPT_FILENAME']), '', $_SERVER['SCRIPT_NAME']);
$result['url'] = $http.$_SERVER['SERVER_NAME'].$port.$user.$root;
return $result;
}
댓글목록
등록된 댓글이 없습니다.