사이트 내 전체검색
PHP
한글파일명 euc-kr)을 출력할때 공백처리문제
로빈아빠
https://cmd.kr/php/881 URL이 복사되었습니다.

본문

1. 한글파일명을 urlencode 를 해주어야 한다.

2. 공백때문에 빈칸은 다른것으로 바꾼뒤 다시 처리한다.

 

 

 

$title="$file ".number_format(filesize($file))." Byte";

$file2=str_replace(" ","space1_replace",$file);

$file2=urlencode($file2);

$file2=str_replace("space1_replace","%20",$file2);

echo "<img src=\"$file2\" width=150 height=150 border=0 title='$file\n".number_format(filesize($file))." Byte' onclick=\"set_img(this,'$size[0]','$size[1]')\" align=absmiddle>"; 

댓글목록

등록된 댓글이 없습니다.

PHP
871 (2/18P)

Search

Copyright © Cmd 명령어 18.119.28.237