Yanor.net/
Wiki
Blog
GitHub
Sandbox
開始行:
* 絵文字表示 [#hef1d0d5]
** ソフトバンク [#g73be8df]
以下、「少年の顔」の絵文字を表示する。絵文字のバイナリコ...
*** HTMLのエンコーディングがシフトJISの場合 [#x424e515]
<?php
header('Content-type: text/html; charset=Shift_JIS');
?>
<html>
<body>
絵文字:
<?php
$bin = pack('C*',hexdec('F9'),hexdec('41'));
print $bin;
?>
</body>
</html>
*** HTMLのエンコーディングがUTF8の場合 [#gce31aa2]
<?php
header('Content-type: text/html; charset=utf-8');
?>
<html>
<body>
絵文字:
<?php
$bin = pack('C*',hexdec('EE'),hexdec('80'),hexdec('81'));
print $bin;
?>
</body>
</html>
終了行:
* 絵文字表示 [#hef1d0d5]
** ソフトバンク [#g73be8df]
以下、「少年の顔」の絵文字を表示する。絵文字のバイナリコ...
*** HTMLのエンコーディングがシフトJISの場合 [#x424e515]
<?php
header('Content-type: text/html; charset=Shift_JIS');
?>
<html>
<body>
絵文字:
<?php
$bin = pack('C*',hexdec('F9'),hexdec('41'));
print $bin;
?>
</body>
</html>
*** HTMLのエンコーディングがUTF8の場合 [#gce31aa2]
<?php
header('Content-type: text/html; charset=utf-8');
?>
<html>
<body>
絵文字:
<?php
$bin = pack('C*',hexdec('EE'),hexdec('80'),hexdec('81'));
print $bin;
?>
</body>
</html>
ページ名: