[제나플러스] cheditor스킨에서 cafe24의 CDN 서비스 이용하기 > 팁앤테크

본문 바로가기
사이트 내 전체검색

팁앤테크

[제나플러스] cheditor스킨에서 cafe24의 CDN 서비스 이용하기

페이지 정보

본문

질문답변코너의 불당님의 질문으로 접근해본 cafe24의 CDN 서비스 이용하기
http://www.sir.co.kr/bbs/board.php?bo_table=g4_qa&wr_id=37839
http://www.sir.co.kr/bbs/board.php?bo_table=g4_qa&wr_id=37934


사용을 위한 조건
    1. cafe24의 image CDN 서비스를 사용할수있어야 한다.
    2. cheditor 에서 제공하는 기능으로 이미지 업로드시에 적용된다.
      (그누보드에서 제공하는 이미지 업로드는 해당사항없음)


수정파일 :
    $g4_path/cheditor/insert_image.php

수정전 :
    if ($success) {
        $filename = $save_as_url . $attach->file['name'];

수정후 :
    if ($success) {

        $ncftp_info = "/usr/bin/ncftpput -u 아이디 -p 비밀번호 -m -DD iup.cdn1.cafe24.com ";
        $remote_dir = "/www/$g4[editor]/$ym/ ";
        $local_file = $save_as_url . $attach->file['name'];
        $ncftp_cmd = $ncftp_info . $remote_dir . $local_file;
        system($ncftp_cmd, $status);

        // ncftp에서 -DD 옵션을 사용했으므로 파일의 유무에 따라서 성공여부 결정
        if(!file_exists($local_tmp)) {
            $save_as_url = "http://아이디.cdn1.cafe24.com/$g4[editor]/$ym/";
        }

        $filename = $save_as_url . $attach->file['name'];


## CDN(Contents Delivery Network) 호스팅이란
  여러곳의 IDC 또는 여러대의 ISP에 동일한 컨텐츠를 올려놓고,
  접속자가 사용하는 인터넷회선의 종류에 따라 가장 가까운 곳에서
  컨텐츠를 불러들일 수 있도록 지원하는 서비스입니다. (cafe24의 설명)
  http://hosting.cafe24.com/cdn/cdn_define.php


## ncftpput의 간략설명
NcFTPPut 3.1.8

Usages:
  ncftpput [flags] remote-host remote-dir local-files...  (mode 1)
  ncftpput -f login.cfg [flags] remote-dir local-files...  (mode 2)
  ncftpput -c remote-host remote-path-name < stdin  (mode 3)

Flags:
  -u XX  Use username XX instead of anonymous.
  -p XX  Use password XX with the username.
  -P XX  Use port number XX instead of the default FTP service port (21).
  -j XX  Use account XX with the account (deprecated).
  -d XX  Use the file XX for debug logging.
  -e XX  Use the file XX for error logging.
  -U XX  Use value XX for the umask.
  -t XX  Timeout after XX seconds.
  -a    Use ASCII transfer type instead of binary.
  -m    Attempt to mkdir the dstdir before copying.
  -v/-V  Do (do not) use progress meters.
  -f XX  Read the file XX for host, user, and password information.
  -c    Use stdin as input file to write on remote host.
  -A    Append to remote files instead of overwriting them.
  -z/-Z  Do (do not) try to resume uploads (default: -Z).
  -T XX  Upload into temporary files prefixed by XX.
  -S XX  Upload into temporary files suffixed by XX.
  -DD    Delete local file after successfully uploading it.
  -b    Run in background (submit job to "ncftpbatch" and run).
  -bb    Same as "-b" but queue only (do not run "ncftpbatch").
  -E    Use regular (PORT) data connections.
  -F    Use passive (PASV) data connections (default).
  -y    Try using "SITE UTIME" to preserve timestamps on remote host.
  -B XX  Try setting the SO_SNDBUF size to XX.
  -r XX  Redial XX times until connected.
  -o XX  Specify miscellaneous options (see documentation).
  -W XX  Send raw FTP command XX after logging in.
  -X XX  Send raw FTP command XX after each file transferred.
  -Y XX  Send raw FTP command XX before logging out.
  -R    Recursive mode; copy whole directory trees.

Examples:
  ncftpput -u gleason -p my.password Elwood.probe.net /home/gleason stuff.txt
  ncftpput -u gleason Elwood.probe.net /home/gleason a.txt (prompt for pass)
  ncftpput -a -u gleason -p my.password -m -U 007 Bozo.probe.net /tmp/tmpdir a.txt
  tar cvf - /home | ncftpput -u operator -c Server.probe.net /backups/monday.tar

Library version: LibNcFTP 3.1.8 (May 26, 2004).

This is a freeware program by Mike Gleason (http://www.ncftp.com).
This was built using LibNcFTP (http://www.ncftp.com/libncftp/).
추천0

댓글목록

profile_image

월드컵님의 댓글

월드컵쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 작성일

현재 이 게시판스킨 본문 글이 IE8에서는 트랙백 위로 한줄만 보이고 나머지 글들은 겹쳐서 보입니다.
그러나 FF에서느 잘 보이는군요.
관리자님 확인 바랍니다. ^^

profile_image

제로님의 댓글의 댓글

제로쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 작성일

익스를 확인 잘안해서 몰랐어요&^^

Total 825건 10 페이지
  • RSS
팁앤테크 목록
번호 제목 글쓴이 조회 추천 날짜
600 제로쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 16065 0 06-14
599 제로쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 16038 0 11-05
598 제로쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 15962 0 10-22
597 제로쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 15951 0 06-12
596 제로쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 15945 0 01-30
595 제로쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 15902 0 04-21
594 포인트쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 15866 0 04-13
593 제로쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 15843 0 11-01
592 제로쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 15829 0 12-02
591 제로쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 15827 0 03-27
590 제로쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 15823 0 01-25
589 포인트쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 15774 0 05-07
588 제로쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 15750 0 10-28
587 제로쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 15749 0 05-12
586 제로쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 15698 0 12-01
585 제로쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 15643 0 05-11
584 제로쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 15636 0 12-06
583 제로쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 15631 0 10-29
582 제로쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 15616 0 03-26
581 제로쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 15608 0 01-19
580 월드컵쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 15602 0 03-31
579 귀여운현호쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 15597 0 10-24
578 제로쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 15591 0 02-07
열람중 제로쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 15588 0 10-26
576 제로쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 15587 0 03-20

검색

회원로그인

회원가입

사이트 정보

株式会社YHPLUS / 대표 : ZERO
〒140-0011 東京都品川区東大井2-5-9-203
050-5539-7787
오픈카카오톡 (YHPLUS) :
https://open.kakao.com/o/slfDj15d

접속자집계

오늘
3,466
어제
4,604
최대
7,259
전체
1,272,891
Copyright (c) 株式会社YHPLUS. All rights reserved.