rukiman
asked on
reading and writing binary files
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.
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.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.