파일 생성 질문해요. > 그누4 질문답변

그누4 질문답변

그누보드4 관련 질문은 QA 로 이전됩니다. QA 그누보드4 바로가기
기존 게시물은 열람만 가능합니다.

파일 생성 질문해요. 정보

파일 생성 질문해요.

본문

<?
include_once("./_common.php");
 
//아이디 파일 생성
$this_folder = "./id/$gr_id"; //폴더지정
$this_name = "index.php"; //파일명
@mkdir($this_folder, 0707);
$file_make = @fopen($this_name, "w");
@fwrite($file_make, "파일내용"); //파일내용
?>
 
 
 
위에 파일내용 부분에,
 
아래 빨간부분만 적용이 되고
 
나머지 파란부분은 적용이 되지 않고 파일을 생성 하려면 어떻게 해야 할까요?
 
<?
$gr_id = $gr_id;
$g4_path = ".";
include_once("$g4_path/_common.php");
$g4[title] = "";
include_once("$g4[cafe_path]/head.php");
?>
<iframe width="100%" height="100%" frameborder="0" marginheight="0" marginwidth="0" scrolling="no" id="cafeHome" src="<?=$g4['cafe_path']?>/home.php?gr_id=<?=$gr_id?>" name="cafeHome" onload="resizeIFrame();"></iframe>
<?
include_once("$g4[cafe_path]/tail.php");
?>
 
 
 
빨간부분의 gr_id 값이 test007 일 때 index.php 파일을 생성하면 index.php 파일의 내용에는 아래와 같이 생성되어야 한다!
 
index.php
 
<?
$gr_id = test007;
$g4_path = ".";
include_once("$g4_path/_common.php");
$g4[title] = "";
include_once("$g4[cafe_path]/head.php");
?>
<iframe width="100%" height="100%" frameborder="0" marginheight="0" marginwidth="0" scrolling="no" id="cafeHome" src="<?=$g4['cafe_path']?>/home.php?gr_id=<?=$gr_id?>" name="cafeHome" onload="resizeIFrame();"></iframe>
<?
include_once("$g4[cafe_path]/tail.php");
?>
 
  • 복사

댓글 전체

© SIRSOFT
현재 페이지 제일 처음으로