ウェブページ|ディスプレイ
<span style="COLOR: #007700"><</SPAN><SPAN style="COLOR: #007700">?</SPAN><SPAN style="COLOR: #0000bb">php</SPAN><SPAN style="COLOR: #0000bb"></SPAN><br/><SPAN style="COLOR: #007700">function</SPAN><SPAN style="COLOR: #0000bb"></SPAN><SPAN style="COLOR: #0000bb">nochaコード</SPAN> <SPAN style="COLOR: #007700"> (</SPAN><SPAN style="COLOR: #0000bb">$encode</SPAN><SPAN style="COLOR: #007700">,</SPAN><SPAN style="COLOR: #0000bb"> </SPAN><SPAN style="COLOR: #0000bb">$str</SPAN><SPAN style="COLOR: #007700">,</SPAN><SPAN style="COLOR: #0000bb"> </SPAN><SPAN style="COLOR: #0000bb">$isemail</SPAN><SPAN style="COLOR: #0000bb"> </SPAN><SPAN style="COLOR: #007700">=</SPAN><SPAN style="COLOR: #0000bb"> </SPAN><SPAN style="COLOR: #0000bb">false</SPAN><SPAN style="COLOR: #007700">) </SPAN><SPAN style="COLOR: #0000bb"></SPAN><SPAN style="COLOR: #007700">{</SPAN><SPAN style="COLOR: #0000bb"></SPAN><br/><SPAN style="COLOR: #0000bb"></SPAN><SPAN style="COLOR: #0000bb">$ str </SPAN><SPAN style="COLOR: #0000bb"> </SPAN><SPAN style="COLOR: #007700">=</SPAN><SPAN style="COLOR: #0000bb"> </SPAN><SPAN style="COLOR: #0000bb">iconv</SPAN><SPAN style="COLOR: #007700">(</SPAN><SPAN style="COLOR: #0000bb">$encode</SPAN><SPAN style="COLOR: #007700">,</SPAN><SPAN style="COLOR: #0000bb"> </SPAN><SPAN style="COLOR: #dd0000">"UTF-16"</SPAN><SPAN style="COLOR: #007700">,</SPAN><SPAN style="COLOR: #0000bb"></SPAN><SPAN style="COLOR: #0000bb">$str </SPAN><SPAN style="COLOR: #007700">)</SPAN><SPAN style="COLOR: #007700">;</SPAN><SPAN style="COLOR: #0000bb"></SPAN><br/><SPAN style="COLOR: #0000bb"> </SPAN><SPAN style="COLOR: #0000bb">for</SPAN><SPAN style="COLOR: #0000bb"> </SPAN><SPAN style="COLOR: #007700">(</SPAN><SPAN style="COLOR: #0000bb">$i</SPAN><SPAN style="COLOR: #0000bb"> </SPAN><SPAN style="COLOR: #007700">=</SPAN><SPAN style="COLOR: #0000bb"> </SPAN><SPAN style="COLOR: #0000bb">0</SPAN><SPAN style="COLOR: #007700">;</SPAN><SPAN style="COLOR: #0000bb"> </SPAN><SPAN style="COLOR: #0000bb">$i</SPAN><SPAN style="COLOR: #0000bb"> </SPAN><SPAN style="COLOR: #007700"><</SPAN><SPAN style="COLOR: #0000bb"> </SPAN><SPAN style="COLOR: #0000bb">strlen</SPAN><SPAN style="COLOR: #007700">(</SPAN><SPAN style="COLOR: #0000bb">$str </SPAN><SPAN style="COLOR: #007700">)</SPAN><SPAN style="COLOR: #007700">;</SPAN><SPAN style="COLOR: #0000bb"> </SPAN><SPAN style="COLOR: #0000bb">$i</SPAN><SPAN style="COLOR: #007700">++</SPAN><SPAN style="COLOR: #007700">,</SPAN><SPAN style="COLOR: #0000bb">$i</SPAN><SPAN style="COLOR: #007700">++</SPAN><SPAN style="COLOR: #007700">)</SPAN><SPAN style="COLOR: #0000bb"> </SPAN><SPAN style="COLOR: #007700">{</SPAN><SPAN style="COLOR: #0000bb"> </SPAN><br/> <SPAN style="COLOR: #0000bb"> </SPAN><SPAN style="COLOR: #0000bb">$コード</SPAN><SPAN style="COLOR: #0000bb"> </SPAN><SPAN style="COLOR: #007700">=</SPAN> <SPAN style="COLOR: #0000bb"> </SPAN><SPAN style="COLOR: #0000bb">注文</SPAN><SPAN style="COLOR: #007700">(</SPAN><SPAN style="COLOR: #0000bb">$str</SPAN><SPAN style="COLOR: #007700">{</SPAN><SPAN style="COLOR: #0000bb">$i</SPAN><SPAN style="COLOR: #007700">}</SPAN><SPAN style="COLOR: #007700">)</SPAN><SPAN style="COLOR: #0000bb"> </SPAN><SPAN style="COLOR: #007700">*</SPAN><SPAN style="COLOR: #0000bb"> </SPAN><SPAN style="COLOR: #0000bb">256</SPAN><SPAN style="COLOR: #0000bb"> </SPAN><SPAN style="COLOR: #007700">+</SPAN><SPAN style="COLOR: #0000bb"> </SPAN><SPAN style="COLOR: #0000bb">注文</SPAN><SPAN style="COLOR: #007700">(</SPAN><SPAN style="COLOR: #0000bb">$ str</SPAN><SPAN style="COLOR: #007700">{</SPAN><SPAN style="COLOR: #0000bb">$i</SPAN><SPAN style="COLOR: #0000bb"> </SPAN><SPAN style="COLOR: #007700">+</SPAN><SPAN style="COLOR: #0000bb"> </SPAN><SPAN style="COLOR: #0000bb">1</SPAN><SPAN style="COLOR: #007700">}</SPAN><SPAN style="COLOR: #007700">)</SPAN><SPAN style="COLOR: #007700">;</SPAN><SPAN style="COLOR: #0000bb"> </SPAN><br/><SPAN style="COLOR: #0000bb"> </SPAN><SPAN style="COLOR: #007700">if </SPAN><SPAN style="COLOR: #0000bb"> </SPAN><SPAN style="COLOR: #007700">(</SPAN><SPAN style="COLOR: #0000bb">$コード</SPAN><SPAN style="COLOR: #0000bb"> </SPAN><SPAN style="COLOR: #007700">< </SPAN><SPAN style="COLOR: #0000bb"> </SPAN><SPAN style="COLOR: #0000bb">128</SPAN><SPAN style="COLOR: #0000bb"> </SPAN><SPAN style="COLOR: #0000bb">と</SPAN><SPAN style="COLOR: #0000bb"> </SPAN><SPAN style="COLOR: #007700">!</SPAN><SPAN style="COLOR: #0000bb">$isemail</SPAN><SPAN style="COLOR: #007700">)</SPAN><SPAN style="COLOR: #0000bb"> </SPAN><SPAN style="COLOR: #007700">{</SPAN><SPAN style="COLOR: #0000bb"> </SPAN><br/><SPAN style="COLOR: #0000bb"> </SPAN><SPAN style="COLOR: #0000bb">$output</SPAN><SPAN style="COLOR: #0000bb"> </SPAN><SPAN style="COLOR: #007700">.=</SPAN><SPAN style="COLOR: #0000bb"> </SPAN><SPAN style="COLOR: #0000bb">chr</SPAN><SPAN style="COLOR: #007700">( </SPAN><SPAN style="COLOR: #0000bb">$code</SPAN><SPAN style="COLOR: #007700">)</SPAN><SPAN style="COLOR: #007700">;</SPAN><SPAN style="COLOR: #0000bb"> </SPAN><br/><SPAN style="COLOR: #0000bb"> </SPAN><SPAN style="COLOR: #007700">}</SPAN><SPAN style="COLOR: #0000bb"> </SPAN><SPAN style="COLOR: #007700">else</SPAN><SPAN style="COLOR: #0000bb"> </SPAN><SPAN style="COLOR: #007700">if</SPAN><SPAN style="COLOR: #0000bb"> </SPAN><SPAN style="COLOR: #007700">( </SPAN><SPAN style="COLOR: #0000bb">$code</SPAN><SPAN style="COLOR: #0000bb"> </SPAN><SPAN style="COLOR: #0000bb">!=</SPAN><SPAN style="COLOR: #0000bb"> </SPAN><SPAN style="COLOR: #0000bb">65279</SPAN><SPAN style="COLOR: #007700"> )</SPAN><SPAN style="COLOR: #0000bb"> </SPAN><SPAN style="COLOR: #007700">{</SPAN><SPAN style="COLOR: #0000bb"> </SPAN><br/><SPAN style="COLOR: #0000bb"> </SPAN><SPAN style="COLOR: #0000bb">$output</SPAN><SPAN style="COLOR: #0000bb"> </SPAN><SPAN style="COLOR: #007700">.=</SPAN><SPAN style="COLOR: #0000bb"> </SPAN><SPAN style="COLOR: #dd0000">"&#"</SPAN><SPAN style="COLOR: #007700">.</SPAN><SPAN style="COLOR: #0000bb">$code</SPAN><SPAN style="COLOR: #007700">.</SPAN><SPAN style="COLOR: #dd0000">";"</SPAN><SPAN style="COLOR: #007700">;</SPAN> <SPAN style="COLOR: #0000bb"> </SPAN><br/><SPAN style="COLOR: #0000bb"> </SPAN><SPAN style="COLOR: #007700">}</SPAN><SPAN style="COLOR: #0000bb"> </SPAN><br/><SPAN style="COLOR: #0000bb"> </SPAN><SPAN style="COLOR: #007700">}</SPAN><SPAN style="COLOR: #0000bb"> </SPAN><br/><SPAN style="COLOR: #0000bb"> </SPAN><SPAN style="COLOR: #007700">return</SPAN><SPAN style="COLOR: #0000bb"> </SPAN><SPAN style="COLOR: #0000bb">$output</SPAN><SPAN style="COLOR: #007700">;</SPAN><SPAN style="COLOR: #0000bb"> </SPAN><br/><SPAN style="COLOR: #007700">}</SPAN><SPAN style="COLOR: #0000bb"> </SPAN><br/><SPAN style="COLOR: #0000bb">$encode </SPAN><SPAN style="COLOR: #0000bb"> </SPAN><SPAN style="COLOR: #007700">=</SPAN><SPAN style="COLOR: #0000bb"> </SPAN><SPAN style="COLOR: #0000bb">$_POST</SPAN><SPAN style="COLOR: #007700">[</SPAN><SPAN style="COLOR: #dd0000">' encode'</SPAN><SPAN style="COLOR: #007700">]</SPAN><SPAN style="COLOR: #007700">;</SPAN><SPAN style="COLOR: #0000bb"> </SPAN><br/><SPAN style="COLOR: #007700">if</SPAN><SPAN style="COLOR: #0000bb"> </SPAN><SPAN style="COLOR: #007700">(</SPAN><SPAN style="COLOR: #0000bb">$encode</SPAN><SPAN style="COLOR: #0000bb"> </SPAN><SPAN style="COLOR: #007700">==</SPAN><SPAN style="COLOR: #0000bb"> </SPAN><SPAN style="COLOR: #dd0000">''</SPAN><SPAN style="COLOR: #007700">)</SPAN> <SPAN style="COLOR: #0000bb"> </SPAN><SPAN style="COLOR: #0000bb">$エンコード</SPAN><SPAN style="COLOR: #0000bb"> </SPAN><SPAN style="COLOR: #007700">=</SPAN> <SPAN style="COLOR: #0000bb"> </SPAN><SPAN style="COLOR: #dd0000">'UTF-8'</SPAN><SPAN style="COLOR: #007700">;</SPAN><SPAN style="COLOR: #0000bb"> </SPAN><br/><SPAN style="COLOR: #007700">if</SPAN><SPAN style="COLOR: #0000bb"> </SPAN><SPAN style="COLOR: #007700">(</SPAN><SPAN style="COLOR: #0000bb">$_FILES</SPAN><SPAN style="COLOR: #007700">[</SPAN><SPAN style="COLOR: #dd0000">'ファイル'</SPAN><SPAN style="COLOR: #007700">]</SPAN><SPAN style="COLOR: #007700">[ </SPAN><SPAN style="COLOR: #dd0000">「サイズ」</SPAN><SPAN style="COLOR: #007700">]</SPAN><SPAN style="COLOR: #0000bb"> </SPAN><SPAN style="COLOR: #007700">></SPAN><SPAN style="COLOR: #0000bb"> </SPAN><SPAN style="COLOR: #0000bb">0</SPAN><SPAN style="COLOR: #007700">)</SPAN><SPAN style="COLOR: #0000bb"> </SPAN><SPAN style="COLOR: #007700">{</SPAN><SPAN style="COLOR: #0000bb"> </SPAN><br/><SPAN style="COLOR: #0000bb"> </SPAN><SPAN style="COLOR: #0000bb">$data</SPAN><SPAN style="COLOR: #0000bb"> </SPAN><SPAN style="COLOR: #007700">=</SPAN><SPAN style="COLOR: #0000bb"> </SPAN><SPAN style="COLOR: #0000bb">nochaoscode</SPAN><SPAN style="COLOR: #007700">(</SPAN><SPAN style="COLOR: #0000bb">$encode</SPAN><SPAN style="COLOR: #007700">,</SPAN><SPAN style="COLOR: #0000bb"> </SPAN><SPAN style="COLOR: #0000bb"> file_get_contents</SPAN><SPAN style="COLOR: #007700">(</SPAN><SPAN style="COLOR: #0000bb">$_FILES</SPAN><SPAN style="COLOR: #007700">[</SPAN><SPAN style="COLOR: #dd0000">'file'</SPAN><SPAN style="COLOR: #007700">]</SPAN><SPAN style="COLOR: #007700">[</SPAN><SPAN style="COLOR: #dd0000">'tmp_name'</SPAN><SPAN style="COLOR: #007700">]</SPAN><SPAN style="COLOR: #007700">)</SPAN><SPAN style="COLOR: #007700">)</SPAN><SPAN style="COLOR: #007700">;</SPAN> <SPAN style="COLOR: #0000bb"> </SPAN><br/><SPAN style="COLOR: #0000bb"> </SPAN><SPAN style="COLOR: #0000bb">ヘッダー</SPAN><SPAN style="COLOR: #0000bb"> </SPAN> <SPAN style="COLOR: #007700">(</SPAN><SPAN style="COLOR: #dd0000">"Content-type: application/octet-stream;"</SPAN><SPAN style="COLOR: #007700">)</SPAN><SPAN style="COLOR: #007700">;</SPAN><SPAN style="COLOR: #0000bb"> </SPAN><br/><SPAN style="COLOR: #0000bb"> </SPAN><SPAN style="COLOR: #0000bb">header</SPAN><SPAN style="COLOR: #0000bb"> </SPAN><SPAN style="COLOR: #007700">(</SPAN><SPAN style="COLOR: #dd0000">"Content-length: "</SPAN> <SPAN style="COLOR: #007700">.</SPAN><SPAN style="COLOR: #0000bb">ストラレン</SPAN> <SPAN style="COLOR: #007700">(</SPAN><SPAN style="COLOR: #0000bb">$data</SPAN><SPAN style="COLOR: #007700">)</SPAN><SPAN style="COLOR: #007700">)</SPAN><SPAN style="COLOR: #007700">;</SPAN><SPAN style="COLOR: #0000bb"> </SPAN><br/><SPAN style="COLOR: #0000bb"> </SPAN><SPAN style="COLOR: #0000bb">header</SPAN><SPAN style="COLOR: #0000bb"> </SPAN><SPAN style="COLOR: #007700">(</SPAN><SPAN style="COLOR: #dd0000">"Content-Disposition: attachment; filename="</SPAN><SPAN style="COLOR: #007700">.</SPAN><SPAN style="COLOR: #0000bb">$_FILES</SPAN><SPAN style="COLOR: #007700">[</SPAN><SPAN style="COLOR: #dd0000">'file'</SPAN><SPAN style="COLOR: #007700">]</SPAN><SPAN style="COLOR: #007700">[ </SPAN><SPAN style="COLOR: #dd0000">「名前」</SPAN><SPAN style="COLOR: #007700">] </SPAN><SPAN style="COLOR: #007700">)</SPAN><SPAN style="COLOR: #007700">;</SPAN><SPAN style="COLOR: #0000bb"> </SPAN><br/><SPAN style="COLOR: #0000bb"> </SPAN><SPAN style="COLOR: #007700">echo</SPAN><SPAN style="COLOR: #0000bb"> </SPAN><SPAN style="COLOR: #0000bb">$data</SPAN><SPAN style="COLOR: #007700">;</SPAN><SPAN style="COLOR: #0000bb"> </SPAN><br/><SPAN style="COLOR: #007700">}</SPAN><SPAN style="COLOR: #0000bb"> </SPAN><SPAN style="COLOR: #007700">el se</SPAN><SPAN style="COLOR: #0000bb"> </SPAN><SPAN style="COLOR: #007700">{</SPAN><SPAN style="COLOR: #0000bb"> </SPAN><br/><SPAN style="COLOR: #0000bb"> </SPAN><SPAN style="COLOR: #0000bb">ヘッダー</SPAN><SPAN style="COLOR: #0000bb"> </SPAN> <SPAN style="COLOR: #007700">(</SPAN><SPAN style="COLOR: #dd0000">"Content-type: text/html; charset=UTF-8"</SPAN><SPAN style="COLOR: #007700">)</SPAN><SPAN style="COLOR: #007700">;</SPAN><SPAN style="COLOR: #0000bb"> </SPAN><br/><SPAN style="COLOR: #0000bb"> </SPAN><SPAN style="COLOR: #007700">if</SPAN><SPAN style="COLOR: #0000bb"> </SPAN><SPAN style="COLOR: #007700">(</SPAN><SPAN style="COLOR: #0000bb">$_POST</SPAN> <SPAN style="COLOR: #007700">[</SPAN><SPAN style="COLOR: #dd0000">「メール」 </SPAN><SPAN style="COLOR: #007700">]</SPAN><SPAN style="COLOR: #007700">)</SPAN><SPAN style="COLOR: #0000bb"> </SPAN><SPAN style="COLOR: #007700">{</SPAN><SPAN style="COLOR: #0000bb"> </SPAN><br/><SPAN style="COLOR: #0000bb"> </SPAN><SPAN style="COLOR: #007700">echo</SPAN><SPAN style="COLOR: #0000bb"> </SPAN><SPAN style="COLOR: #0000bb">htmlentities</SPAN><SPAN style="COLOR: #007700">(</SPAN><SPAN style="COLOR: #0000bb">nochaoscode</SPAN>) <SPAN style="COLOR: #007700">(</SPAN><SPAN style="COLOR: #0000bb">$エンコード</SPAN><SPAN style="COLOR: #007700">,</SPAN><SPAN style="COLOR: #0000bb"> </SPAN><SPAN style="COLOR: #0000bb">$_POST</SPAN><SPAN style="COLOR: #007700">[</SPAN> <SPAN style="COLOR: #dd0000">「メール」</SPAN><SPAN style="COLOR: #007700">]</SPAN><SPAN style="COLOR: #007700">,</SPAN><SPAN style="COLOR: #0000bb"> </SPAN><SPAN style="COLOR: #0000bb">true</SPAN><SPAN style="COLOR: #007700">)</SPAN><SPAN style="COLOR: #007700">)</SPAN><SPAN style="COLOR: #007700">;</SPAN><SPAN style="COLOR: #0000bb"> </SPAN><br/><SPAN style="COLOR: #0000bb"> </SPAN><SPAN style="COLOR: #007700">}</SPAN><SPAN style="COLOR: #0000bb"> </SPAN> <br/><SPAN style="COLOR: #0000bb"> </SPAN><SPAN style="COLOR: #007700">else</SPAN><SPAN style="COLOR: #0000bb"> </SPAN><SPAN style="COLOR: #007700">{</SPAN><SPAN style="COLOR: #0000bb"> </SPAN><br/><SPAN style="COLOR: #0000bb"> </SPAN><SPAN style="COLOR: #007700">echo</SPAN><SPAN style="COLOR: #0000bb"> </SPAN><SPAN style="COLOR: #0000bb">htmlentities</SPAN><SPAN style="COLOR: #007700">(</SPAN><SPAN style="COLOR: #0000bb">nochaoscode</SPAN><SPAN style="COLOR: #007700">(</SPAN><SPAN style="COLOR: #0000bb">$encode</SPAN><SPAN style="COLOR: #007700">,</SPAN><SPAN style="COLOR: #0000bb"> </SPAN><SPAN style="COLOR: #0000bb">$_POST</SPAN><SPAN style="COLOR: #007700">[</SPAN><SPAN style="COLOR: #dd0000">'content' </SPAN><SPAN style="COLOR: #007700">]</SPAN><SPAN style="COLOR: #007700">)</SPAN><SPAN style="COLOR: #007700">)</SPAN><SPAN style="COLOR: #007700">; </SPAN><SPAN style="COLOR: #0000bb"> </SPAN><br/><SPAN style="COLOR: #0000bb"> </SPAN><SPAN style="COLOR: #007700">}</SPAN><SPAN style="COLOR: #0000bb"> </SPAN><br/><SPAN style="COLOR: #0000bb">?></span>