NicEdit Upload php file > PHP

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

PHP

NicEdit Upload php file

페이지 정보

profile_image
작성자 관리자
댓글 0건 조회 6,617회 작성일 20-09-18 09:47

본문

Version 0.9 r25

 nicURI : 'https://api.imgur.com/3/image', --> nicURI : './file.php',
 -----------------------------------
 [file.php]


 //Check if we are getting the image
 if(isset($_FILES['image'])) {

  $path = "./upload/";

  $file_path = pathinfo($_FILES["image"]['name']);

  $file_ext = $file_path['extension'];

  list($width, $height) = getimagesize($_FILES['image']['tmp_name']);
  $file_upload_name = time().".".$file_ext;
  $target_file = $path.$file_upload_name;

  if(move_uploaded_file($_FILES['image']['tmp_name'], $target_file)) {

  $data = array( "type"=> $file_ext,
  "width"=> $width ,
  "height"=> $height,
  "name"=> "",
  "link"=> $target_file);
  $response = array('data' => $data, 'success' => true, "status" => 200 );
  echo json_encode($response);

  }
 }

 -----------------------------------
 :: NicEdit php 파일업로드

댓글목록

등록된 댓글이 없습니다.

회원로그인

회원가입

Copyright © neion.co.kr All rights reserved.