디렉토리 및 파일 생성 퍼미션 정의된 상수로 변경

This commit is contained in:
chicpro
2013-08-22 10:23:01 +09:00
parent f4df5b27e0
commit 1afa7c1b58
10 changed files with 26 additions and 26 deletions

View File

@ -635,8 +635,8 @@ function it_img_upload($srcfile, $filename, $dir)
return '';
if(!is_dir($dir)) {
@mkdir($dir, 0707);
@chmod($dir, 0707);
@mkdir($dir, G4_DIR_PERMISSION);
@chmod($dir, G4_DIR_PERMISSION);
}
$filename = preg_replace("/\s+/", "", $filename);
@ -660,7 +660,7 @@ function upload_file($srcfile, $destfile, $dir)
if ($destfile == "") return false;
// 업로드 한후 , 퍼미션을 변경함
@move_uploaded_file($srcfile, $dir.'/'.$destfile);
@chmod($dir.'/'.$destfile, 0606);
@chmod($dir.'/'.$destfile, G4_FILE_PERMISSION);
return true;
}

View File

@ -17,7 +17,7 @@ class g4_thumb {
var $green = 0xff;
var $blue = 0xff;
var $quality = 100;
var $permission = 0606;
var $permission = G4_FILE_PERMISSION;
function g4_thumb($path, $width) {
$this->set_path($path);
@ -27,8 +27,8 @@ class g4_thumb {
// 경로
function set_path($path) {
$this->path = $path;
@mkdir($path, 0707);
@chmod($path, 0707);
@mkdir($path, G4_DIR_PERMISSION);
@chmod($path, G4_DIR_PERMISSION);
}
function set_width($width) {