|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-07-11 22:57 UTC] tony2001@php.net
[2005-07-11 22:57 UTC] derick@php.net
[2005-07-11 22:59 UTC] derick@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Nov 25 11:00:01 2025 UTC |
Description: ------------ Hi, I have a really strange behaviour with unpack() function and i didn't found any bug / issue like this one. The result of unpack() is diff. on a spcific server (my client's new hosting company). I tested the script on Win and Linux and everything works fine, with the same .dbf file (the file is not corrupted). Please help. Many thanks, Radu Reproduce code: --------------- $data = fread ($fp, 32) or die ("Could not read data from file <i>$file</i>"); $header_format = 'H2id/' . 'CYear/' . 'CMonth/' . 'CDay/' . 'L# of Records/' . 'SHeader Size/' . 'SRecord Size'; $header = unpack ($header_format, $data); Expected result: ---------------- Array ( [id] => 03 [Year] => 105 [Month] => 7 [Day] => 2 [# of Records] => 2713 [Header Size] => 129 [Record Size] => 58 ) Actual result: -------------- Array ( [id] => 03 [Year] => 105 [Month] => 7 [Day] => 2 [# of Records] => 2713 [Header Size] => 33024 [Record Size] => 14848 )