게시판 글쓰기 자동등록방지에 대해서
본문
게시판 글쓰기에 있는 자동등록방지 가
도메인 앞에 www 를 붙이면 나오지 않습니다.
그냥 www없이 도메인만으로 하면 나오고요....
http://www.samchonc.com/bbs/write.php?bo_table=customer <- 여긴 안나옴
http://samchonc.com/bbs/write.php?bo_table=customer <- 여긴 나옴
답변 1
common.php 중에서
이걸루 바꿔보세요.
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']);
$host = isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : $_SERVER['SERVER_NAME'];
if(isset($_SERVER['HTTP_HOST']) && preg_match('/:[0-9]+$/', $host))
$host = preg_replace('/:[0-9]+$/', '', $host);
$result['url'] = $http.$host.$port.$user.$root;
return $result;
}
베타 버전꺼 사용하시는 것 같네요 ^^
!-->
답변을 작성하시기 전에 로그인 해주세요.