/************************************************ 퍼센트 ************************************************/ function GetPercent($val,$total) { if($val) { return ($val/$total)*100; }else { return 0; } } /************************************************ 전체 값에서 퍼센트에 해당하는 값을 뺀 값 ************************************************/ function GetDepercentRemain($per,$total) { return $total-(($per/100)*$total)..
function array2cookie($arr,$cname,$ctime=0,$cpath="/",$cdomain="") { //$_arr = arrayWalk($arr,"urlencode"); $_arr = serialize($arr); setcookie("$cname",$_arr,$ctime,"$cpath",$cdomain); unset($_arr); } function arrayWalk($arr,$func) { switch(!is_array($arr)) { case true: return $arr; break; } foreach($arr as $key=>$val) { switch(is_array($val)) { case true: $arr[$key] = arrayWalk($val,$func); bre..
if(!function_exists("stripos")) { function stripos($srch,$str) { return strpos(strtolower($srch),strtolower($str)); } } function make_pattern_str_ireplace(&$pat, $key) { $pat = '/'.preg_quote($pat, '/').'/i'; } if(!function_exists('str_ireplace')){ function str_ireplace($search, $replace, $subject){ if(is_array($search)){ array_walk($search, 'make_pattern_str_ireplace'); } else{ $search = '/'.pr..
useradd -M -s /bin/false 추가할계정 혹은 useradd -d /web/mailuser/ID 추가할계정 #vi /etc/mail/local-host-names domain.com mail.domain.com #vi /etc/mail/virtusertable mailuserid@domain.com userid #makemap hash /etc/mail/virtusertable < /etc/mail/virtusertable