if (strstr($view[wr_content],"{include '")) {
$n=0;
while($n++<10 && preg_match("/{include '([\x21-\xff]*)'}/i",$view[wr_content],$reg)) {
if (!$reg[1] || strlen($reg[1])<4) continue;
$extend=get_extend($reg[1]);
if ($extend!=".php" && $extend!=".html") continue;
if (strstr($reg[1],"config.")) continue;
$file1=str_replace("\$",$g4[path],$reg[1]);
$file1=str_replace("@",$g4[ar_skin_path],$file1);
//echo "$reg[1],$file1<BR>";
if (!is_file($file1)) {
$view[wr_content] = str_replace("{include '$reg[1]'}","check file: $file1",$view[wr_content]);
continue;
}
ob_start();
include $file1;
$out = ob_get_clean(); // append this to $html and empty buffer
$view[wr_content] = str_replace("{include '$reg[1]'}",$out,$view[wr_content]);
}
}
'PHP∵SCRIPT' 카테고리의 다른 글
영문자로만 되어 있는지 (0) | 2013.12.31 |
---|---|
문자열에서 영문+숫자만추출하기 (0) | 2013.12.31 |
번호 시작 1. tets 2.tets 11.test 추출 정렬 처리 (0) | 2013.12.31 |
내용중 image 추출 처리 (0) | 2013.12.31 |
정규식 배열로 여러 개 동시 처리 (0) | 2013.12.31 |
정규식 문자열 내 이미지,링크 추출하기 (0) | 2013.12.31 |
php한글체크를 위한 정규표현식 (0) | 2013.12.31 |
ereg / eregi 오류 Function eregi() is deprecated in 처리 (0) | 2013.12.31 |
댓글