php 打包解包

$mydb = fopen('my.db','w');
$name = pack('A20','nike');
$name.= pack('S',16);
$name.= pack('a20','aaa@vvv.com');
fwrite($mydb,$name);
$out = unpack('A20name/Sage/a20email',file_get_contents('my.db'));
var_dump($out);
fclose($mydb);

发表评论

电子邮件地址不会被公开。 必填项已用*标注