본문 바로가기

분류 전체보기245

php curl 새창 읽기 get 방식, post 방식 데이터 넘기기 예제 함수로 만들어 놓고 쓰면 좋을듯 싶다. ​ 2021. 1. 19.
php 카카오 로그인 예제 function 함수명 { ​ $rawData = $_POST ? $_POST : $_GET; //$rawData['token'] // header('Content-Type: application/json; charset=utf-8'); ​ $api_url = 'https://kapi.kakao.com/v2/user/me'; $access_token = $rawData['token']; ​ $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $api_url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_HTTPHEA.. 2021. 1. 19.
php array_pop()이란 예제 php 내장함수 1. array의 마지막값을 뽑아 내고 그 값을 반환한다. 2. array의 길이를 원소 하나 만큼 줄인다. 3.array가 비어있으면 (또는 배열이 아니면) NULL을 반환한다. 결과 값 Array ( [0] => aaa [1] => bbb [2] => ccc ) 2021. 1. 19.
html display none script 컨트롤 html javascript //비공개 $('#displaycheck').css('display','none'); //공개 $('#displaycheck').css('display',''); 2021. 1. 19.
javascript form reset 초기화 form reset 초기화 1.폼에 id 값을 지 2. 스크립트 선언 function form_reset() { document.getElementById("form_apply").reset(); } 3. 실행 버튼 출처:http://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_form_reset Tryit Editor v3.6 Enter some text in the fields below, then press the "Reset form" button to reset the form. First name: Last name: function myFunction() { document.getElementById("myForm").reset(); } www.. 2021. 1. 19.
php csv 메모장에서는 정상 엑셀에서는 한글깨지는 현상 php DB내용을 엑셀로 저장하여 서버에 올리는 작업을 진행했다. php인코딩을 아래와 같이 utf-8로 진행하니 웹 사이트에서는 정상적으로 소스가 표출 되었으나, 엑셀로 실행 할 시 ansi로 자동 실행되어 한글이 깨졌다. 메모장으로 실행할 경우 정상적으로 한글이 표출 되었다. header('Content-Type:text/css;charset=UTF-8;'); 버그를 잡기위해 삽질을 하다 도달한 결론은 파일 전체 인코딩을 EUC-KR로 하고 한글 요소들을 utf-8로 인코딩을 하는 것이었다. 골자소스는 아래와 같다. header('Content-Type:text/css;charset=EUC-KR;'); header('Expires: 0'); header('Content-Transfer-Encoding.. 2021. 1. 19.
"continue" targeting switch is equivalent to "break". error fix php 7.3 에서는 switch 문에서 continue 기능을 더 이상 사용 할 수 없다. switch 문의 구조를 변경하여 해결 하였다. 2021. 1. 19.
HTTPS connections over proxy are currently not supported snoopy 프록시 우회를 사용할 경우 https 접속시 아래와 같은 메세지를 표출하는 경우가 있다. HTTPS connections over proxy are currently not supported 해결 방법은아래 소스로 넘기는 url 값을 변경하면 된다. $snoopy->referer = $url; $snoopy->fetch($url); 에 넘기는 파라미터값을 https->http로 변경하면 된다. 예제 소스는 아래와 같다. $url=str_replace("https","http",$url) 2021. 1. 12.
stream_socket_client() php_network_getaddresses getaddrinfo failed name or service not known php snoopy 라이브러리로 크롤링기능을 개발하여 서버에 업로드 하였다. 개발 서버에서는 정상 작동하던 프로그램이 서버이전시 다음과 같은 error 메세지를 표시하며 작동하지 않았다. stream_socket_client() php_network_getaddresses getaddrinfo failed name or service not known 원인 1)서버 접근 권한없음 2)서버에서 요청이 나갈 권한이 없음. 해결 방법 1) 본인의 포트와 호스트를 확인하여 서버 접속 권한을 얻으면된다. 2) 프록시 우회기능을 사용한다. snoopy의 경우 38~39line var $proxy_host = ""; // proxy host to use var $proxy_port = ""; // proxy port.. 2021. 1. 12.
php apache css js 파일 안 읽힘 php err_aborted 404 (not found) css 1. php.ini 수정 default_mimetype="text/html" -> default_mimetype="" 2.디렉토리 접근 권한 777로 변경 3.apache http.conf AddType text/css .sss 추가 4.header에 경로 변경 /html/common.css /html/common.js -> ./html/common.css ./html/common.js 2021. 1. 10.
깃 사용법 #1 how to make repositories step1. enter user manager console step2. click this button step3 enter user Repository name(1) and Description(2) and check your share type(3) and click button(4) 2021. 1. 9.
깃 사용법 #2 how to upload to github how to hit code upload step1 step2 step3 result 2021. 1. 9.