반응형

전체 글 162

[jsp] 이클립스 톰캣 연동 - jsp 초보강좌 #4

1. 이클립스 톰캣 연동 톰캣과 이클립스를 다 설치하였다면 이클립스와 톰캣을 연동하는 법을 알아보겠습니다. * 톰캣설치 https://koreanred.tistory.com/119 [jsp] 윈도우 11 톰캣(Tomcat 9.0.79) 설치 - jsp 초보강좌 #2 1. 톰캣(Tomcat) 설치 Java 기반의 서블릿 컨테이너이자 웹 어플리케이션 서버, 아파치에서 만든 오픈 소스 소프트웨어 톰캣 다운로드 https://tomcat.apache.org/ Apache Tomcat® - Welcome! The Apache Tomcat® software koreanred.tistory.com * 이클립스 설치 https://koreanred.tistory.com/120 [jsp] 이클립스 다운로드 및 설정 - ..

JSP 2023.08.19

[jsp] 이클립스 다운로드 및 설정 - jsp 초보강좌 #3

1. 이클립스 다운로드 https://www.eclipse.org/downloads/ Eclipse Downloads | The Eclipse Foundation The Eclipse Foundation - home to a global community, the Eclipse IDE, Jakarta EE and over 415 open source projects, including runtimes, tools and frameworks. www.eclipse.org 최신버젼은 패스를 하고 그 이전버젼을 설치했습니다. 이클립스는 설치하는게 아니고 압축을 풀고 이클립스.exe 파일을 실행시키면 됩니다. Eclipse IDE for Enterprise Java and Web Developers 자신의 환경..

JSP 2023.08.19

[jsp] 윈도우 11 톰캣(Tomcat 9.0.79) 설치 - jsp 초보강좌 #2

1. 톰캣(Tomcat) 설치 Java 기반의 서블릿 컨테이너이자 웹 어플리케이션 서버, 아파치에서 만든 오픈 소스 소프트웨어 톰캣 다운로드 https://tomcat.apache.org/ Apache Tomcat® - Welcome! The Apache Tomcat® software is an open source implementation of the Jakarta Servlet, Jakarta Server Pages, Jakarta Expression Language, Jakarta WebSocket, Jakarta Annotations and Jakarta Authentication specifications. These specifications are part of the tomcat.apac..

JSP 2023.08.19

[jsp] JDK 설치 - jsp 초보강좌 #1

1. JDK 설치 jsp 기반의 웹프로그램을 개발하기 위해서는 JDK와 웹서버를 설치해야한다. JDK (Java Development Kit) : jsp 웹페이지와 서블릿 클래스(Servlet Class) 를 컴파일하고 실행한다. JDK 가 설치될 때 JRE(Java Run-time Environment, 자바 실행환경)도 같이 설치가 됩니다. JDK 다운로드 https://www.oracle.com/java/technologies/ Oracle Java Technologies | Oracle Java Is the Language of Possibilities Java is powering the innovation behind our digital world. Harness this potential ..

JSP 2023.08.19

[PHP] 파일 확장자, 파일명, 폴더 파일리스트 구하기

파일 확장자 파일명 구하기 basename($filename); // path를 제외한 파일명 aaa.txt pathinfo($filename, PATHINFO_FILENAME); // 확장자를 제외한 파일명 aaa pathinfo($filename, PATHINFO_EXTENSION); // 파일 확장자 txt - 폴더안에 원하는 확장자 파일 리스트만 배열로 구하기 function getCurrentFileList($dir){ $valid_formats = array("jpg","png",'gif'); // 이미지 파일만 $handle = opendir($dir); $result = array(); while ($filename = readdir($handle)) { if($filename == '.'..

PHP 2023.08.17

[PHP] 외부서버의 파일 가져오기

외부 서버의 파일을 가져오려면 우선 php.ini에서 "allow_url_fopen"이 "on" 되어 있어야 한다. 아니면 힘든 과정을 거쳐야 한다. 1. copy 함수 이용 $url = "http://t1.daumcdn.net/daumtop_chanel/op/20200723055344399.png"; $file_name = basename($url); copy($url, "./upload/".$file_name); 2. file_get_contents, file_put_contents 함수 이용 $url = "http://t1.daumcdn.net/daumtop_chanel/op/20200723055344399.png"; $file_name = basename($url); $file = file_get..

PHP 2023.08.17

[자바스크립트] 숫자 3자리마다 ,(콤마) 찍기 - 화폐단위

자바스크립트로 숫자 3자리마다 ,(콤마) 찍기 함수입니다. 화폐단위라고도 하는데 php에서는 number_format과 같은 함수를 자바스크립트로 만들어 봤네요. function number_format(num) { var str = num; if(typeof data == 'number') { str = str+''; } var n = (str.replace(/[^\d]+/g, '')).replace(/(\d)(?=(?:\d{3})+(?!\d))/g, '$1,'); return n; }; 맨날 필요할때 찾아서 쓰고 했는데 이제 찾아보기도 귀찮아서 그냥 저장해놓습니다.

자바스크립트 2023.08.17

react - cookie 사용

개요 쿠키는 웹사이트 방문 기록 정보 파일로 로그인, 광고, 사용자 판단 ...에서 중요한 요소입니다. 이러한 쿠키를 react에서 사용하는 방법을 알아보는 시간을 가지겠습니다. ​ react cookie 프로젝트에서 쿠키를 활용하기 위한 라이브러리를 설치합니다. npm i react-cookie 프로젝트 최상단에 CookiesProvider를 사용합니다. import React from 'react'; import App from './App'; import { CookiesProvider } from 'react-cookie'; export default function Root() { return ( ); } // App.jsx import React, { Component } from 'react..

React 2020.10.09

euc-kr 페이지에서 AJAX 연동시 한글 깨짐 현상(php)

AJAX는 기본적으로 UTF-8 인코딩을 사용하기 때문에 인코딩이 euc-kr(KSC5601)인 페이지에서 ajax를 사용하게 되면 한글이 깨지게 된다. 이러한 현상을 해결하기 위해서는 통신시 적절한 변환처리가 필요하다. 페이지에서 요청을 보낼 때 var val = encodeURIComponent("한글"); /* 값을 UTF-8 형식으로 인코딩 해 준다. "한글" 이라는 문자열은 0xED959C, 0xEAB880이므로 val에는 %ED%95%9C%EA%B8%80이라는 문자열이 들어간다. */ PHP에서 받을 때 $value = iconv("UTF-8", "CP949", rawurldecode($value)); /* http://www.php.net/manual/en/function.rawurldeco..

PHP 2020.03.20
반응형