사이트 내 전체검색
PHP
이미지 base64_encode() 처리
로빈아빠
https://cmd.kr/php/315 URL이 복사되었습니다.

본문

$uploadfile = "이미지전체경로";
  $fd = fopen ($uploadfile,"rb");
  $size=filesize ($uploadfile);
  $c=substr("$uploadfile_name",strrpos($uploadfile_name,".")+1);
  $cont = fread ($fd, $size);
  fclose ($fd);
  $encimg=base64_encode($cont);
  $imgcode=chunk_split("$encimg",50,"'.'");

  echo base64_decode($imgcode);

댓글목록

등록된 댓글이 없습니다.

PHP
871 (5/18P)

Search

Copyright © Cmd 명령어 3.145.161.180