php 如何写二进制文件 回复内容: php 如何写二进制文件 php v4 之後有packphp.net pack — Pack data into binary string $bom = mb_convert_encoding("", "unicode", "HTML-ENTITIES"); $fp = fopen('text.txt', 'w'); fwrite($fp, pack('a2', $bom)); 登录后复制