답변 1개 / 댓글 4개
채택된 답변
+20 포인트
/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개
/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);
답변을 작성하려면 로그인이 필요합니다.