Skip to content
조회 수 10196 추천 수 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
번호 분류 제목 날짜 조회 수
557 Server Windows APM Install(Apache 2.4, PHP 6.0, Mysql) 최신버전 설치해보기 2015.11.27 1250
556 WindowsTip Windows ARP Spoofing 10 file 2013.03.29 11956
555 WindowsTip windows Arp Spoofing Tool 5 2013.01.05 8092
554 컴퓨터잡담 windows error 코드표 4 2009.11.25 22197
553 컴퓨터잡담 Windows Firewall/Internet Connection Sharing (ICS) 서비스를 시작할 수 없습니다. 4 2010.06.19 20959
552 컴퓨터잡담 Windows Movie Maker 2.1 다운로드 2 2 file 2010.09.11 22457
551 WindowsTip Windows XP 부팅속도 개선 팁 file 2015.01.24 1416
550 컴퓨터잡담 Windows XP 서비스 팩 2에서 Internet Explorer 추가 기능을 관리하는 방법 2 2011.01.18 10081
549 컴퓨터잡담 Windows XP 인증방법 개선으로 업데이트 기능 정상 사용하기 2010.11.03 6590
548 컴퓨터잡담 windows xp 정품인증 크랙 2011.08.01 8118
547 컴퓨터잡담 Windows XP에서 Boot.ini 파일을 편집하는 방법 2009.12.08 19534
546 Server Windows 서버에서 XE 속도 대폭 개선 방법 3 2013.03.02 11638
545 컴퓨터잡담 Windows 초간단 remote 백업 명령 2009.11.24 23511
544 WindowsTip Windows-XP 의 [Prefetch] 폴더에 대하여[C:\WINDOWS\Prefetch] 2013.12.04 24635
543 컴퓨터잡담 Windows에서 4GB 메모리 인식시키기(설정방법) 2013.05.11 9768
542 컴퓨터잡담 Windows와 DOS 명령 프롬프트 환경 변수 리스트 1 4 2010.06.18 11187
541 파이썬 Windows용 Tesseract 설치 및 사용법 2022.11.26 19583
540 AutoHotKey WinMenuSelectItem로 메뉴선택하기 1 2011.02.17 16302
539 WindowsTip Winpe 4in1 2015.03.10 1477
538 컴퓨터잡담 Wireshark 이용하여 tcp/ip 패킷내용 추출하기 2 6 2012.10.18 8149
Board Pagination Prev 1 ... 17 18 19 20 21 ... 46 Next
/ 46

http://urin79.com

우린친구블로그

sketchbook5, 스케치북5

sketchbook5, 스케치북5

나눔글꼴 설치 안내


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

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

설치 취소