- htmlspecialchars
<html>
<body>
<?php
$str = "Jane & 'Tarzan' () ";
echo htmlspecialchars($str, ENT_COMPAT);
echo "<br />";
echo htmlspecialchars($str, ENT_QUOTES);
echo "<br />";
echo htmlspecialchars($str, ENT_NOQUOTES);
?>
</body>
</html>

The quote style. One of the following constants:
quote_style constants
Constant Name Description
ENT_COMPAT Will convert double-quotes and leave single-quotes alone (default)
ENT_QUOTES Will convert both double and single quotes
ENT_NOQUOTES Will leave both double and single quotes unconverted

- htmlspecialchars_decode
<?php
$str = '<p>this -&gt; &quot;</p>';

echo htmlspecialchars_decode($str);

// note that here the quotes aren't converted
echo htmlspecialchars_decode($str, ENT_NOQUOTES);
?>

- 아스키
* chr (ASCII 번호)  : ASCII 번호에 해당하는 문자를 리턴
* ord ("문자") : 문자에 해당하는 ASCII 번호를 리턴
<?php
echo ord(")");
echo chr(40);
?>

크리에이티브 커먼즈 라이센스
Creative Commons License
이올린에 북마크하기(0) 이올린에 추천하기(0)

Posted by 홍반장

2010/08/16 10:20 2010/08/16 10:20
, , , , ,
Response
No Trackback , No Comment
RSS :
http://tcbs17.cafe24.com/tc/rss/response/5446

Trackback URL : http://tcbs17.cafe24.com/tc/trackback/5446

« Previous : 1 : ... 1020 : 1021 : 1022 : 1023 : 1024 : 1025 : 1026 : 1027 : 1028 : ... 6391 : Next »

블로그 이미지

- 홍반장

Archives

Recent Trackbacks

Calendar

«   2024/12   »
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31        
Statistics Graph

Site Stats

Total hits:
250390
Today:
369
Yesterday:
295