답변 1개
채택된 답변
+20 포인트
4년 전
/shop.config.php
// 쇼핑몰 설정값 배열변수
$default = sql_fetch(" select * from {$g5['g5_shop_default_table']} ");
/extend/shop.extend.php
include_once(G5_LIB_PATH.'/shop.lib.php');
로그인 후 평가할 수 있습니다
답변에 대한 댓글 4개
4년 전
마지막으로 하나만 더 물어봐도될까요? 그러면 shop.extend.php를 확장하거나 읽는부분은 어디에있을까요? common.php에 있을꺼 같았는데 이쪽에도 안보여서요
4년 전
/common.php 파일에서 extend 폴더에 있는 파일 전체를 자동으로 include 합니다.
// common.php 파일을 수정할 필요가 없도록 확장합니다.
$extend_file = array();
$tmp = dir(G5_EXTEND_PATH);
while ($entry = $tmp->read()) {
// php 파일만 include 함
if (preg_match("/(\.php)$/i", $entry))
$extend_file[] = $entry;
}
if(!empty($extend_file) && is_array($extend_file)) {
natsort($extend_file);
foreach($extend_file as $file) {
include_once(G5_EXTEND_PATH.'/'.$file);
}
unset($file);
}
unset($extend_file);
// common.php 파일을 수정할 필요가 없도록 확장합니다.
$extend_file = array();
$tmp = dir(G5_EXTEND_PATH);
while ($entry = $tmp->read()) {
// php 파일만 include 함
if (preg_match("/(\.php)$/i", $entry))
$extend_file[] = $entry;
}
if(!empty($extend_file) && is_array($extend_file)) {
natsort($extend_file);
foreach($extend_file as $file) {
include_once(G5_EXTEND_PATH.'/'.$file);
}
unset($file);
}
unset($extend_file);
댓글을 작성하려면 로그인이 필요합니다.
답변을 작성하려면 로그인이 필요합니다.
로그인