Skip to content

CHICPRO

  • Life Log
  • Cycling Log
  • Photo Log
    • Portrait
    • Landscape
    • Flower
    • Etc
  • Coding Log
  • Information

[PHP] 주어진 경로의 하위 폴더명 출력하기

2018-05-02 by 편리

주어진 경로의 하위 폴더명을 출력하는 코드이다. <?php function getDirectories(string $path) { $path = realpath($path); if (!is_dir($path)) return false; $directories = array(); foreach (scandir($path) as $val) { if (in_array($val, array(‘.’, ‘..’))) continue; $dir = $path.DIRECTORY_SEPARATOR.$val; if (is_dir($dir)) { $directories[] = $dir; $directories = array_merge($directories, getDirectories($dir)); } } return $directories; } $directories = getDirectories(‘./locale’); print_r($directories); 위의 코드를 …

Dropzonejs를 이용한 Drag & Drop 파일 업로드 구현

2018-03-28 by 편리

Dropzonejs를 이용해 Drag & Drop 파일 업로드 기능을 구현했다. form 페이지에서 업로드 이미지를 추가하고 submit 버튼을 클릭했을 때 서버로 이미지 파일이 업로드되도록 했고 추가된 이미지 파일을 삭제했을 때 서버에 저장된 이미지도 삭제되도록 기능을 구현했다. 스크립트 코드 중 일부는 jQuery를 이용하기 때문에 함께 로드되어야 한다.

<form name="fname">
<label for="fld">필드</label>
<input type="text" name="fld" id="fld" value="">

<div class="dropzone" id="fileDropzone"></div>

</form>

form은 위와 같이 추가적인 input 필드와 dropzone이 포함되어 있다. Dropzonejs 사용을 위해 스크립트 파일을 로드한다.

<script src="./js/dropzone.js"></script>

(more…)

Continue Reading

[PHP] Database class for MySQL which uses the PDO extension

2018-04-12 by 편리

PHP Data Object(PDO)를 이용하여 MySQL DB를 사용하기 위한 Class 이다. Prepared statements 와 named placeholder 를 사용하도록 코드를 작성했다. Class 사용 전 DB_NAME, DB_USER 등의 정보를 설정해야 한다. 아래 코드는 PHP 7.0.0 버전 이상에서 사용할 수 있다. <?php // DB 설정 define(‘DB_HOST’, ‘localhost’); define(‘DB_NAME’, ”); define(‘DB_USER’, ”); define(‘DB_PASS’, ”); define(‘DB_ERROR_MODE’, ”); // SILENT, WARNING class DB …

Continue Reading

Harman Kardon Esquire Mini Brown Esquire Mini Speaker

2018-03-14 by 편리

Harman Kardon Esquire Mini Brown Esquire Mini Speaker

➜ Price : $54.99

Harman Kardon Esquire Mini is a bold, state-of-the-art solution exceeding the needs of the on-the-go professional. No attention-to detail has been spared-from the lineup of premium materials utilized by master craftsmanship to the chic urban styling of its sublime, unibody design. Completely portable and wireless, it provides exceptional sound from its dual, high-performance drivers and enhanced bass port design -for the best quality sound in its category. Esquire Mini is also Bluetooth-enabled, for full stereo streaming with your favorite devices. It’s the must-have accessory for your audio style. It doubles as a conference phone system with dual-microphone and built-in echo and noise cancelation technology for superb sound and USB access to recharge your favorite devices. An 8-hour, rechargeable Li-ion battery promises remote accessibility while its runway-ready, head-turning appearance translates to an indispensable travel companion for work or play. This is one piece designed to offer style and performance for you and your music. (more…)

Continue Reading

[PHP] Kakao Vision API 사용을 위한 PHP Client

2018-03-09 by 편리

지난 2018년 3월 7일 공개된 Kakao Vision API 사용을 위한 PHP Client를 개발했다. Vision API를 이용해 이미지의 성인이미지 여부 등을 판별할 수 있다. php-kakao-vision-api 클라이언트는 아래의 Vision API를 지원한다.

  • 얼굴 검출
  • 상품 검출
  • 썸네일 검출
  • 썸네일 생성
  • 멀티태그 생성
  • 성인 이미지 판별

composer 를 통한 설치를 지원하며 아래 명령을 통해 설치할 수 있다.

composer require chicpro/php-kakao-vision-api
  • Github 저장소 : https://github.com/chicpro/php-kakao-vision-api
  • Packagist : https://packagist.org/packages/chicpro/php-kakao-vision-api

(more…)

Continue Reading

Posts pagination

  • Previous
  • 1
  • …
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • …
  • 748
  • Next

Recent Posts

  • SK 세븐모바일 유심 셀프교체
  • php 배열 연산에서 + 와 array_merge 의 차이
  • pcntl_fork 를 이용한 다중 프로세스 실행
  • 아이폰 단축어를 이용하여 주중 공휴일엔 알람 울리지 않게 하기
  • 구글 캘린더 전체일정 재동기화
  • OpenLiteSpeed 웹서버에 HTTP 인증 적용
  • OpenLiteSpeed 웹어드민 도메인 연결
  • WireGuard를 이용한 VPN 환경 구축
  • Ubuntu 22.04 서버에 OpenLiteSpeed 웹서버 세팅
  • 맥 vim 세팅

Recent Comments

  • 편리 on 업무관리용 그누보드 게시판 스킨
  • 임종섭 on 업무관리용 그누보드 게시판 스킨
  • 캐논 5D 펌웨어 | Dslr 펌웨어 업그레이드 방법 82 개의 베스트 답변 on 캐논 EOS 30D 펌웨어 Ver 1.0.6 , EOS 5D 펌웨어 Ver 1.1.1
  • Top 5 캐논 5D 펌웨어 Top 89 Best Answers on 캐논 EOS 30D 펌웨어 Ver 1.0.6 , EOS 5D 펌웨어 Ver 1.1.1
  • 편리 on 워드프레스 애니메이션 gif 파일을 mp4로 변환하여 출력하기
  • 임팀장 on 워드프레스 애니메이션 gif 파일을 mp4로 변환하여 출력하기
  • 편리 on Notepad++ NppFTP 플러그인 수동 설치
  • paul-j on Notepad++ NppFTP 플러그인 수동 설치
  • YS on Windows 10 iCloud 사진 저장 폴더 변경
  • 편리 on Docker를 이용한 Centos7 + httpd + php 5.4 개발환경 구축

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org
© 2025 CHICPRO | Built using WordPress and SuperbThemes