2011-09-29 2 views
-3

을 보낸 나는이 오류 코드 2 코드 1을 변경하려고하면헤더 정보를 수정할 수 없습니다 - 헤더가 이미 내 (워드 프레스) 함수에서

은 경고 : 헤더 정보를 수정할 수 없습니다 - 이미 (출력에 의해 전송 헤더 시작 /home/consumer/public_html/themeforward.com/demo2/wp-content/themes/Tutles/functions.php:1) /home/consumer/public_html/themeforward.com/demo2/wp-admin/theme-editor에서 확인하십시오. 99

코드 1

array( 
    "name" => "Custom CSS", 
    "desc" => "Want to add any custom CSS code? Put in here, and the rest is taken care of. This overrides any other stylesheets. eg: a.button{color:green}", 
    "id" => $shortname."_custom_css", 
    "type" => "textarea", 
    "std" => "" 
),  

코드 2

라인 PHP는
array( 
    "name" => "Link Color", 
    "desc" => "Want to add any custom CSS code? Put in here, and the rest is taken care of. This overrides any other stylesheets. eg: a.button{color:green}", 
    "id" => $shortname."_link_color", 
    "type" => "textarea", 
    "std" => "" 
),  

라인 89-102 :

// don't allow template files in subdirectories 
if (false !== strpos($basename, '/')) continue; 

$template_data = implode('', file($template)); 

$name = ''; 
if (preg_match('|Single Post Template:(.*)$|mi', $template_data, $name)) 
    $name = _cleanup_header_comment($name[1]); 

if (!empty($name)) { 
    if(basename($template) != basename(__FILE__)) 
     $post_templates[trim($name)] = $basename; 
} 

을 나는이 문제를 해결하는 방법에 관해서는 완전히 혼란 스러워요.

+1

'/ WP - 콘텐츠/테마/Tutles/functions.php : 1' Line 1, 아마도 공백입니다. – Mob

답변

1

아마도 파일을 만들었거나 파일을 편집했습니다. 내가 functions.php을 가정?

파일의 시작 부분이나 끝 부분에 공백이있을 가능성이 있습니다.

파일 끝에서 공백이 발생하지 않도록하려면?> 태그 만 제거하면됩니다. 또한 모든 파일의 시작 부분에 공백을 제거

0

PHP 파일이 BOM이없는 UTF8로 인코딩 되었습니까? 그렇지 않으면이 방법으로 인코딩하고 다시 시도하십시오. 어쩌면 이것은 오류를 얻는 방법입니다

+2

죄송합니다, 내 대답을 편집했습니다. –

0

첫 번째 <?php 태그 앞에 공백이나 BOM이 있습니다. 그것을 제거하십시오

0

일부 편집자 편집기에 표시되지 않는 파일의 시작 부분 (에서 "DTZ"추가합니다. 특정 인코딩을 사용하는 경우

관련 문제