으 잘안되네여!!! 도와주세여ㅠ222 정보
으 잘안되네여!!! 도와주세여ㅠ222본문
서브페이지를 만들고 있는데여
서브페이지는 sub>sub1-1.php파일이 잇는데요
요파일 안에 인클루드를 하려고해여 그런데www파일에 있는 _common,php파일을 인클루드하려는데
<?
include_once("../_common.php");
include_once("../lib/latest.lib.php");
$g4['title'] = "";
include_once("../_head.php");
?>
요런식으로 바꿔주는게 맞나요??
서브페이지는 sub>sub1-1.php파일이 잇는데요
요파일 안에 인클루드를 하려고해여 그런데www파일에 있는 _common,php파일을 인클루드하려는데
<?
include_once("../_common.php");
include_once("../lib/latest.lib.php");
$g4['title'] = "";
include_once("../_head.php");
?>
요런식으로 바꿔주는게 맞나요??
댓글 전체

sub 폴더면
<?
$g4_path = '..';
include_once("$g4_path/common.php");
include_once("$g4[path]/lib/liatest.lib.php");
이런식으로 선언해서 쓰세요!
<?
$g4_path = '..';
include_once("$g4_path/common.php");
include_once("$g4[path]/lib/liatest.lib.php");
이런식으로 선언해서 쓰세요!
고렇게변경하면
Warning: Cannot modify header information - headers already sent by (output started at /home/hosting_user/zxcvb212/www/sub/sub1-1.php:3) in /home/hosting_user/zxcvb212/www/common.php on line 8
Warning: main(../lib/liatest.lib.php) [function.main]: failed to open stream: No such file or directory in /home/hosting_user/zxcvb212/www/sub/sub1-1.php on line 29
Warning: main() [function.include]: Failed opening '../lib/liatest.lib.php' for inclusion (include_path='.:/home/Product/php-4.4.7/lib/php') in /home/hosting_user/zxcvb212/www/sub/sub1-1.php on line 29
이런 에러가.. ㅠ떠요
서브페이지에 헤더랑 레프느 메뉴 인클루드하고픈데 잘안되네여...
Warning: Cannot modify header information - headers already sent by (output started at /home/hosting_user/zxcvb212/www/sub/sub1-1.php:3) in /home/hosting_user/zxcvb212/www/common.php on line 8
Warning: main(../lib/liatest.lib.php) [function.main]: failed to open stream: No such file or directory in /home/hosting_user/zxcvb212/www/sub/sub1-1.php on line 29
Warning: main() [function.include]: Failed opening '../lib/liatest.lib.php' for inclusion (include_path='.:/home/Product/php-4.4.7/lib/php') in /home/hosting_user/zxcvb212/www/sub/sub1-1.php on line 29
이런 에러가.. ㅠ떠요
서브페이지에 헤더랑 레프느 메뉴 인클루드하고픈데 잘안되네여...

먼저 sub디렉토리 안에 _common.php를 만들어서
$g4[path] = ".."; 라는 내용으로 저장하신 후
<?
include_once("./_common.php");
include_once("$g4[path]/lib/latest.lib.php");
$g4['title'] = "";
include_once("$g4[path]/_head.php");
?>
로 하시면됩니다.
$g4[path] = ".."; 라는 내용으로 저장하신 후
<?
include_once("./_common.php");
include_once("$g4[path]/lib/latest.lib.php");
$g4['title'] = "";
include_once("$g4[path]/_head.php");
?>
로 하시면됩니다.
말씀해주신데로 바꿔 봣는데요
Warning: Cannot modify header information - headers already sent by (output started at /home/hosting_user/zxcvb212/www/sub/sub1-1.php:2) in /home/hosting_user/zxcvb212/www/common.php on line 8
Warning: Cannot modify header information - headers already sent by (output started at /home/hosting_user/zxcvb212/www/sub/sub1-1.php:2) in /home/hosting_user/zxcvb212/www/head.sub.php on line 32
Warning: Cannot modify header information - headers already sent by (output started at /home/hosting_user/zxcvb212/www/sub/sub1-1.php:2) in /home/hosting_user/zxcvb212/www/head.sub.php on line 34
Warning: Cannot modify header information - headers already sent by (output started at /home/hosting_user/zxcvb212/www/sub/sub1-1.php:2) in /home/hosting_user/zxcvb212/www/head.sub.php on line 35
Warning: Cannot modify header information - headers already sent by (output started at /home/hosting_user/zxcvb212/www/sub/sub1-1.php:2) in /home/hosting_user/zxcvb212/www/head.sub.php on line 36
Warning: Cannot modify header information - headers already sent by (output started at /home/hosting_user/zxcvb212/www/sub/sub1-1.php:2) in /home/hosting_user/zxcvb212/www/head.sub.php on line 37
Warning: Cannot modify header information - headers already sent by (output started at /home/hosting_user/zxcvb212/www/sub/sub1-1.php:2) in /home/hosting_user/zxcvb212/www/head.sub.php on line 38
요런식으로 또 뜨고말았어요ㅠㅠ
서브페이지 전용으로 인클루드파일 헤더레프트를 만들어 놓아야 하나요??
Warning: Cannot modify header information - headers already sent by (output started at /home/hosting_user/zxcvb212/www/sub/sub1-1.php:2) in /home/hosting_user/zxcvb212/www/common.php on line 8
Warning: Cannot modify header information - headers already sent by (output started at /home/hosting_user/zxcvb212/www/sub/sub1-1.php:2) in /home/hosting_user/zxcvb212/www/head.sub.php on line 32
Warning: Cannot modify header information - headers already sent by (output started at /home/hosting_user/zxcvb212/www/sub/sub1-1.php:2) in /home/hosting_user/zxcvb212/www/head.sub.php on line 34
Warning: Cannot modify header information - headers already sent by (output started at /home/hosting_user/zxcvb212/www/sub/sub1-1.php:2) in /home/hosting_user/zxcvb212/www/head.sub.php on line 35
Warning: Cannot modify header information - headers already sent by (output started at /home/hosting_user/zxcvb212/www/sub/sub1-1.php:2) in /home/hosting_user/zxcvb212/www/head.sub.php on line 36
Warning: Cannot modify header information - headers already sent by (output started at /home/hosting_user/zxcvb212/www/sub/sub1-1.php:2) in /home/hosting_user/zxcvb212/www/head.sub.php on line 37
Warning: Cannot modify header information - headers already sent by (output started at /home/hosting_user/zxcvb212/www/sub/sub1-1.php:2) in /home/hosting_user/zxcvb212/www/head.sub.php on line 38
요런식으로 또 뜨고말았어요ㅠㅠ
서브페이지 전용으로 인클루드파일 헤더레프트를 만들어 놓아야 하나요??

common위에는 공백이 있거나 내용이 들어가면 안됩니다.
if(!headers_sent())header(...); 헤더앞에 적어주니까 에러가 없어졌어요 !! ㅎㅎ
신경써서 답변주신거 감사합니다~
신경써서 답변주신거 감사합니다~