$vi back.sh #!/bin/sh time=`date '+%Y%m%d%H%M'` etc="etc" cd / backup_path ="/backup_path/" cd $backup_path mysqldump -u[userid] -p[userpwd] [dbname] > "$time.sql" --default-character-set=latin1 --set-charset find /backup_path/* -mtime +5 -exec rm -f {} '; $chmod 700 back.sh $crontab -e 00 05 * * * /path/backup.sh (새벽 5시 정각) * --default-character-set=latin1 --set-charset 캐릭터셋 지정
@http://www.ibm.com/developerworks/kr/library/tutorial/l-vi/index.html
한대의 서버에 apache1 과 apache2 로 구동중일때 예 : apache1 은 http, apache2 는 https(ssl) 서로간의 세션공유는 각각의 httpd.conf에 User와 Group을 동일하게 함으로서 가능하다. (/tmp/sess_sessionid 파일의 권한을 777로 해도 되나 보안상 문제의 소지가 있다.) 이경우 업로드된 파일의 소유자,그룹도 동일하게 된다 php 상에서 서브도메인 간의 세션공유는 session_set_cookie_params(0,"/",".domain.com"); 으로 가능하다.
DOM 프로퍼티 attributes :현재 노드에 대한 속성 목록을 반환 parentNode :현재 노드의 부모노드 반환 기본구문: objParentNode = xmlDocumentNode.parentNode childNodes :현재 노드의 모든 하위노드 목록 반환 기본구문)objNodeList = node.childNodes[n] previousSibling : 현재 노드의 바로 이전 형제 노드 반환, 없으면 null 반환 nextSibling : 현재 노드의 바로 다음 형제 노드를 반환, 없으면 null 반환 nodeType : 주어진 노드에 대한 DOMtype 지정한다 기본구문)numNodeType = xmlDocNode.NodeType; Details)12가지의 정수값을반환한다 value ---..
getImageResizedWH([max width,max height],[image width,image height]); mw = max width mh = max height cw = image width ch = image height getImageResizedWH([100,100],[cw,ch]) 일 경우 가로 세로 모두 최대값에 영향을 받음 getImageResizedWH([100,0],[cw,ch]) 일 경우 가로만 최대값에 영향을 받음 getImageResizedWH([0,100],[cw,ch]) 일 경우 세로만 최대값에 영향을 받음 function getImageResizedWH(arrmx,arrcrnt) { mw = arrmx[0]; mh = typeof(arrmx[1]) == "un..
importJS(jfunc,jsrc,jchar) jfunc : jsrc에 있는 기본함수 or 찾을 함수 jsrc : 스크립트 경로 jchar : charset jsrc가 없으면 jfunc을 이용 jfunc는 경로형 함수명 (예 : _module_js_func == /module/js/func.js) function importJS(jfunc,jsrc,jchar) { if(!function_exists(jfunc)) { if(typeof jsrc == "undefined" || jsrc == "") { jsrc = jfunc.replace(/_/gi,"/"); jsrc = jsrc+".js"; } ojs = document.createElement("script"); ohead = document.docu..