How can I write/read encoded numbers into/from a file?
| From: | Julio Sergio Santana | Date: | Thu, 08 Jul 2004 16:44:36 +0000 |
| Subject: | How can I write/read encoded numbers into/from a file? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-189979@lists.php.net to get a copy of this message | ||
I'm just starting with PHP, and I've been browsing the whole manual to find how to solve the following problem:
1. An integer number is internally represented in 4 bytes. Say, for instance, number 65 is represented by 0x00000041, that is the string "\0\0\0\0x41", and not the string "65".
2. How can I write this representation into a file and then read back it from the file?
Do you have any idea about this?
Thank you,
Sergio.