여기는 상당히 일반적인 질문이지만 내 Uni 모듈 용 웹 사이트를 만들고 초기화 파일과 설정 파일이 모든 페이지에서 오류를 일으키고 있습니다. 왜 그런지 알아 내지 못 하죠. 나는 모든 페이지에 내 init 파일을 포함시키고 나의 init 파일은 나의 설정 파일을 포함한다! init 파일의 2 행이나 파일 중 아무 것도 출력되지 않습니다. 나는 왼쪽이 게시물에 대한 내 설정 변수를 변경 있지만이 됩니다이 오류가PHP 오류 - 이미 보낸 헤더 정보 헤더를 수정할 수 없습니다.
Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /customers/a/b/7/mywebsite/httpd.www/currentpage.php:1) in /customers/a/b/7/mywebsite/httpd.www/config/init.php on line 2
config.php를
<?php
session_start();
require_once 'config.php';
?>
init.php
<?php
//Database depends on host
$db['hostname'] = 'myhostname';
$db['username'] = 'username';
$db['password'] = 'mypassword';
$db['database'] = 'database';
$db['dbdriver'] = 'mysqli';
//$connection = new mysqli($hostname, $username, $password, $databaseName);
$connection = new mysqli($db['hostname'],
$db['username'],$db['password'],$db['database']);
?>
입니다 원인을하지 않은
Currentpage.php
<!DOCTYPE html>
<head>
<html lang="en">
</head>
<?php
require 'header.php';
?>
<!-- Primary Page Layout
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
<?php
require 'leftnav.php';
?>
<?php require 'footer.php'; ?>
</div>
</div>
<!-- End Document
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
" php"전에 공백을 확인하고 제거하십시오. 이것은 여러 번 발생합니다. –
PHP 태그를 열기 전에 공백이 없어야합니다. –
@SureshKamrushi PHP 태그 앞에 공백이 없습니다 – norskdreamer