본문 바로가기

반응형

프로그래밍

(46)
input type=month 이전달, 다음달 넣기 input type=month에 이전달과 다음달 넣기 버튼입니다. 이전 월 다음 월
[ai] Adobe illustrator multiple file into one 어도비 일러스트레이트에서 여러개의 파일을 하나의 대지(artboard)에 합치는 스크립트 입니다. singsinghe/mergeAiFile: This program is combines multiple illustrations and pdf files into one file. (github.com) GitHub - singsinghe/mergeAiFile: This program is combines multiple illustrations and pdf files into one file. This program is combines multiple illustrations and pdf files into one file. - GitHub - singsinghe/mergeAiFile: This pr..
한진택배 api PHP에서 HMACSha245 값 처리방법 php로 한진택배 송장출력 api를 작성중에 관련 소스가 없어서 오픈한다. $hanjin_client_id = "고객사 id"; // 영문아이디 $hanjinApiKey = "한진APIKEY"; $hanjinSecretKey = "한진SecretKey"; $method = "POST"; // "POST"; // $_SERVER['REQUEST_METHOD']; $requestUrl = "http://$_SERVER[HTTP_HOST]"."$_SERVER[REQUEST_URI]"; $queryString = getQueryString($requestUrl); $timestamp = date("YmdHis"); $message = $timestamp . $method . $queryString . $hanj..
[php] 원천징수 계산함수(3.3%) function getTaxAfter($price){ $a = round(floor($price*0.03),-1); $b = round(floor($a*0.1),-1); $p = $price - ($a+$b); return $p; }
파이썬 ftp로 접속후 한글파일 다운로드 import ftplib import os # ftp 정보 host = 'server' user = 'id' passwd = 'pw' try: # ftp 연결 with ftplib.FTP() as ftp: ftp.connect(host=host,port=21) print(ftp.getwelcome()) # 접속 메세지 출력 ftp.encoding = 'utf-8' ftp.sendcmd('OPTS UTF8 ON') # 이 문구를 넣어줘야 한글 사용이 가능함 s = ftp.login(user=user,passwd=passwd) ftp.cwd('/테스트폴더A') dirlist = ftp.nlst() print(dirlist) ftp.cwd('테스트폴더B') dirlist = ftp.nlst() print(di..
codef.io php로 토큰값 가져오기 $url = "https://oauth.codef.io/oauth/token?grant_type=client_credentials&scope=read"; $clientId = "클라이언트ID"; $clientSecret = "클라이언트시크릿키"; $credentials = base64_encode($clientId.":".$clientSecret); $headers = []; $headers[] = "Authorization: Basic {$credentials}"; $headers[] = 'Content-Type: application/json'; $headers[] = 'Cache-Control: no-cache'; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL..
jquery Formdata를 이용해 업로드 방법 jquery를 이용한 ajax 업로드 방법입니다. 페이지를 전환하지 않고 파일이나 자료등을 전송할 수 있습니다.
summernote 붙여넣은 파일로 저장하기 summernote에서 이미지들을 직접 붙여넣을 경우 base64인코딩 되는 형태로 전달되게 됩니다. 이걸 바로 db에 저장해버리면..... 용량이 어마무시 해지는데요.. 그럴때 해당 내용중 이미지태그만 분리해서 별도의 파일로 저장하는 방법입니다. $detail=$_REQUEST['memo']; // memo라는 필드로 값이 들어오게 될경우 //Prepare HTML & ignore HTML errors $dom = new \domdocument(); $dom->loadHtml(''.$detail, LIBXML_NOWARNING | LIBXML_NOERROR); // 인코딩을 넣지 않으면 한글이 깨지게 된다. //identify img element $images = $dom->getelementsbyt..

반응형