reading and writing binary files
Posted on 2005-03-15
How can I create a binary file using PHP
ie I want to store say these information
1 bytes (record number)
10 bytes (name)
so say i have a record number that is represented by a byte followed by a name that is made up of 10bytes.
How would I create a binary file with this information? Seem like even though I use the"b" mode when openning files the record number gets stored as a string instead of a byte.
I can't use a text file for what I am trying to do.