data/cache 서브디렉토리명 변경

This commit is contained in:
gnuboard
2013-01-23 18:01:43 +09:00
parent f0413606bc
commit e649644a1a
4 changed files with 11 additions and 10 deletions

View File

@ -2,7 +2,7 @@
include_once('./_common.php'); include_once('./_common.php');
$file = addslashes($_GET['file']); $file = addslashes($_GET['file']);
$captcha_path = mk_subdir($g4['cache_dir'].'/'.$g4['captcha_dir']); $captcha_path = mk_subdir($g4['cache_captcha_dir']);
$filepath = $captcha_path.'/'.$file; $filepath = $captcha_path.'/'.$file;
$original = "number.wav"; $original = "number.wav";

View File

@ -247,7 +247,7 @@ function captcha_file($extension='.png')
{ {
global $g4; global $g4;
mk_subdir($g4['cache_dir']); mk_subdir($g4['cache_dir']);
$captcha_path = mk_subdir($g4['cache_dir'].'/'.$g4['captcha_dir']); $captcha_path = mk_subdir($g4['cache_captcha_dir']);
return $captcha_path.'/'.abs_ip2long().'_'.$_COOKIE['PHPSESSID'].$extension; return $captcha_path.'/'.abs_ip2long().'_'.$_COOKIE['PHPSESSID'].$extension;
} }
?> ?>

View File

@ -12,14 +12,16 @@ if ($g4['https_url']) {
$g4['https_bbs_url'] = $g4['https_url'].'/'.$g4['bbs']; $g4['https_bbs_url'] = $g4['https_url'].'/'.$g4['bbs'];
} }
$g4['data_dir'] = 'data'; $g4['data_dir'] = 'data';
$g4['data_url'] = $g4['url'].'/'.$g4['data_dir']; $g4['data_url'] = $g4['url'].'/'.$g4['data_dir'];
$g4['data_path'] = $g4['path'].'/'.$g4['data_dir']; $g4['data_path'] = $g4['path'].'/'.$g4['data_dir'];
$g4['cache_dir'] = 'cache'; $g4['cache_dir'] = 'cache';
$g4['cache_path'] = $g4['data_path'].'/'.$g4['cache_dir']; $g4['cache_path'] = $g4['data_path'].'/'.$g4['cache_dir'];
$g4['captcha_dir'] = 'captcha'; $g4['cache_latest_dir'] = $g4['cache_dir'].'/latest';
$g4['cache_member_dir'] = $g4['cache_dir'].'/member';
$g4['cache_captcha_dir']= $g4['cache_dir'].'/captcha';
// g4s 기본 DHTML EDITOR // g4s 기본 DHTML EDITOR
if (!defined('G4_EDITOR')) define('G4_EDITOR', 0); if (!defined('G4_EDITOR')) define('G4_EDITOR', 0);

View File

@ -1623,8 +1623,7 @@ function is_checked($field)
function mk_subdir($subdir) function mk_subdir($subdir)
{ {
global $g4; global $g4;
$data_path = $g4['path'].'/'.$g4['data_dir']; $data_subpath = $g4['path_path'].'/'.$subdir;
$data_subpath = $data_path.'/'.$subdir;
if (!is_dir($data_subpath)) { if (!is_dir($data_subpath)) {
@mkdir($data_subpath, 0707); @mkdir($data_subpath, 0707);
@chmod($data_subpath, 0707); @chmod($data_subpath, 0707);