?><!doctype html> 오류를 못찾게네요

?><!doctype html> 오류를 못찾게네요

QA

?><!doctype html> 오류를 못찾게네요

답변 6

본문

아래와 같이 브라우저에서 페이지 소스보기하면 ?><!doctype html> 이 되는데 아무리 소스를 봐도 오류를 찾을수가 없네요

조언 부탁드립니다

 

	
		
			?><!doctype html>
		
		
			 
			<html lang="ko">
		
		
			 
			<head>
		
		
			 
			<meta charset="utf-8">
		
		
			 
			<meta name="title" content="" />
		
		
			 
			<meta name="author" content="" />
		
		
			 
			<meta name="keywords" content="" />
		
		
			 
			<meta name="description" content="" />
		
		
			 
			<meta http-equiv="imagetoolbar" content="no"><meta http-equiv="X-UA-Compatible" content="IE=edge"><title>그누보드5</title>
		
	


 

아래의 소스부분입니다



<?php
// 이 파일은 새로운 파일 생성시 반드시 포함되어야 함
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가

$begin_time = get_microtime();

if (!isset($g5['title'])) {
    $g5['title'] = $config['cf_title'];
    $g5_head_title = $g5['title'];
}
else {
    $g5_head_title = $g5['title']; // 상태바에 표시될 제목
    $g5_head_title .= " | ".$config['cf_title'];
}

// 현재 접속자
// 게시판 제목에 ' 포함되면 오류 발생
$g5['lo_location'] = addslashes($g5['title']);
if (!$g5['lo_location'])
    $g5['lo_location'] = addslashes(clean_xss_tags($_SERVER['REQUEST_URI']));
$g5['lo_url'] = addslashes(clean_xss_tags($_SERVER['REQUEST_URI']));
if (strstr($g5['lo_url'], '/'.G5_ADMIN_DIR.'/') || $is_admin == 'super') $g5['lo_url'] = '';

/*
// 만료된 페이지로 사용하시는 경우
header("Cache-Control: no-cache"); // HTTP/1.1
header("Expires: 0"); // rfc2616 - Section 14.21
header("Pragma: no-cache"); // HTTP/1.0
*/
?>
<!doctype html>
<html lang="ko">
<head>
<meta charset="utf-8">
<meta name="title" content="" />
<meta name="author" content="" />
<meta name="keywords" content="" />
<meta name="description" content="" />

이 질문에 댓글 쓰기 :

답변 6

페이지;를 호출하는 것마다 그런가요?

위 화일이 head.sub.php인가요? 별도로 만든 화일 같은데....

이 화일 이전에 include되는 화일들 중에 php가 끝난 후에 다시 ?><---이것이 들어간 곳이 있어서 그렇습니다

우선 doctype 시작 되기전 php부분

// 만료된 페이지로 ~~~<--- 다음 행의 주석처리를 하나 해제 해보세요

어디서 불필요한 것이 들어간 것인지 에러가 나올 것입니다

에러가 보이지 않으면 아래코드를 맨 위에 넣고 해보세요

error_reporting(E_ALL & ~E_NOTICE); ini_set("display_errors", 1);

 

안되면 test.php 만들기

<?php

include_once("common.php");

?>

test

 

이렇게 해서 테스트 해보고 common.php 다음에 

include_once("head.sub.php"); 추가

이런식으로 하나씩 추가해보는 수 밖에 없을 듯 합니다

 

 

 

 

 

<!DOCTYPE html>
<html lang="ko">
<?php
// 이 파일은 새로운 파일 생성시 반드시 포함되어야 함
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가

$begin_time = get_microtime();

if (!isset($g5['title'])) {
    $g5['title'] = $config['cf_title'];
    $g5_head_title = $g5['title'];
}
else {
    $g5_head_title = $g5['title']; // 상태바에 표시될 제목
    $g5_head_title .= " | ".$config['cf_title'];
}

// 현재 접속자
// 게시판 제목에 ' 포함되면 오류 발생
$g5['lo_location'] = addslashes($g5['title']);
if (!$g5['lo_location'])
    $g5['lo_location'] = addslashes(clean_xss_tags($_SERVER['REQUEST_URI']));
$g5['lo_url'] = addslashes(clean_xss_tags($_SERVER['REQUEST_URI']));
if (strstr($g5['lo_url'], '/'.G5_ADMIN_DIR.'/') || $is_admin == 'super') $g5['lo_url'] = '';

/*
// 만료된 페이지로 사용하시는 경우
header("Cache-Control: no-cache"); // HTTP/1.1
header("Expires: 0"); // rfc2616 - Section 14.21
header("Pragma: no-cache"); // HTTP/1.0
*/
?> 
<head>
<meta charset="utf-8">
<meta name="title" content="" />

위치를 이렇게 옮기면 어떻게 나오나요 

extend 폴더 안 파일이나

루트의 common.php , config.php  살펴보세요.

혹시, 해당 파일들 맨 하단? ?>이 있는지....

아래의 소스부분입니다 == 이 파일 명이 어떻게 되나요?

URL에 있는 경로가 이 파일을 include하는 건가요?

답변을 작성하시기 전에 로그인 해주세요.
전체 4
© SIRSOFT
현재 페이지 제일 처음으로