그누보드 그누보드에 compser vendor 로드하기
페이지 정보

본문
그누보드설치폴더/common.php
//==============================================================================
// 공통
//------------------------------------------------------------------------------
$dbconfig_file = G5_DATA_PATH.'/'.G5_DBCONFIG_FILE; <======== 151 라인
if (file_exists($dbconfig_file)) {
include_once($dbconfig_file);
include_once(G5_LIB_PATH.'/common.lib.php'); // 공통 라이브러리
여기에 아래부분를 추가해준다.
//==============================================================================
아래부분 추가
//=========================================================== // 2022.07.01 추가부분, vendor 와 /lib 폴더의 파일 include 하기
require (G5_PATH . "/../vendor/autoload.php");
// /lib 폴더안에 있는 파일들을 로드하기
// 그누보드 설치폴더 : /board 일때
// /lib/ 부분 자동로드할때, 필요없으면 지워도 됨
$extend_file = array();
$tmp = dir(G5_PATH . "/../lib");
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_PATH . "/../lib/" . $file);
}
unset($file);
}
unset($extend_file);
//=====================================================
- 이전글두 날짜사이의 일수 구하기 22.07.24
- 다음글해당 월의 1 ~ 마지막일 구하기 22.07.07
댓글목록
등록된 댓글이 없습니다.