PHP Warning: unpack(): Type L: not enough input, need 4, have x

问题:PHP Warning: unpack(): Type L: not enough input, need 4, have X
原因:unpack函数的第二参数为 不够4位
$data = '233';
var_dump(unpack(“L”,substr($data,0,4)));
?>

可以修个该为
$data = '0233';
var_dump(unpack(“L”,substr($data,0,4)));
?>

你可能感兴趣的:(PHP Warning: unpack(): Type L: not enough input, need 4, have x)