Skip to content
조회 수 10179 추천 수 0 댓글 0
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄

PHP) Example #1 HTML 엔티티 디코딩

<?php
$orig 
"I'll \"walk\" the <b>dog</b> now";

$a htmlentities($orig);

$b html_entity_decode($a);

echo 
$a// I'll &quot;walk&quot; the &lt;b&gt;dog&lt;/b&gt; now

echo $b// I'll "walk" the <b>dog</b> now


// PHP 4.3.0 이전 사용자는 이렇게 할 수 있습니다:
function unhtmlentities($string)
{
    
// 숫자 엔티티 치환
    
$string preg_replace('~&#x([0-9a-f]+);~ei''chr(hexdec("\\1"))'$string);
    
// 문자 엔티티 치환
    
$trans_tbl get_html_translation_table(HTML_ENTITIES);
    
$trans_tbl array_flip($trans_tbl);
    return 
strtr($string$trans_tbl);
}

$c unhtmlentities($a);

echo 
$c// I'll "walk" the <b>dog</b> now

?>

 

 

로그인 후 댓글쓰기가 가능합니다.

?

List of Articles
번호 분류 제목 날짜 조회 수
72 Server php) 엑셀로 저장하기 2013.05.24 22063
71 Server php) 이미지 사이즈 구해서 0이면 게시물 내용 없애기 2013.07.05 11285
70 Server XE DB 튜닝 2014.09.13 4375
69 Server 웹하드 서버 구축하기 2 file 2015.03.03 3257
68 Server php.ini 파일설정으로 파일업로드 용량늘리기 2015.03.03 1114
67 Server XE 업데이트 후 모듈업데이트가 안될때 참고 file 2015.03.13 1440
66 Server APMSETUP7 PHP 업그레이드 2015.06.02 6351
65 Server XE 카카오톡 글전송 2015.07.08 1222
64 Server XE ckeditor 모바일에서 사용하기 2015.07.13 1151
63 Server 파일 업로드 폴더 변경 2015.07.13 1904
62 Server Windows APM Install(Apache 2.4, PHP 6.0, Mysql) 최신버전 설치해보기 2015.11.27 1246
61 Server 오토셋과 apmsetup file 2016.02.17 2025
60 Server 8기가 램에 맞는 Mysql config 셋팅 값 1 2016.02.22 3856
59 Server 아파치 ab 로 성능테스트 하기 2016.02.22 12332
58 Server MySQL - 속도저하에 따른 웹페이지 접속 지연 2016.03.03 1301
57 Server WAPM에서 Database 접속 속도 개선하기 2016.03.03 1223
56 Server XE성능 캐시활용으로 속도 100배 개선하기(Varnish 캐시서버 + XE(+패치) + nginx(혹은 아파치) / Wincache) file 2016.03.04 1440
55 Server PHP 가속기 secret 2016.03.05 510
54 Server 아파치 MPM 모드와 nginx 비교(apache 2.4 vs nginx) 2016.03.05 6429
53 Server PHP Opcache 속도개선 시키기 2016.03.07 1824
Board Pagination Prev 1 2 3 4 5 Next
/ 5

http://urin79.com

우린친구블로그

sketchbook5, 스케치북5

sketchbook5, 스케치북5

나눔글꼴 설치 안내


이 PC에는 나눔글꼴이 설치되어 있지 않습니다.

이 사이트를 나눔글꼴로 보기 위해서는
나눔글꼴을 설치해야 합니다.

설치 취소