Read and write
| From: | Francois Boucher | Date: | Fri, 13 Jul 2001 11:55:28 +0000 |
| Subject: | Read and write | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-57703@lists.php.net to get a copy of this message | ||
I need to read in a binary file.
(the file is write in c++ and contain integer, interger,char(10),char(10) )
So I need to read this and write it in normal caracters.
So I try:
$fp = fopen("data_bin.dat",rb);
$data[] = fread($fp,4);
$data[] = fread($fp,4);
$data[] = fread($fp,10);
$data[] = fread($fp,10);
but i think it wrong...
Thanks.
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-= François Boucher =-
-= franky@Boucheros.com =-
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-