Re: Read and write

From: Date: Fri, 13 Jul 2001 10:05:21 +0000
Subject: Re: Read and write
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-57708@lists.php.net to get a copy of this message
Put quotes around "rb", but I don't think you need the b. Also, are the integers always char(4)? /* Chris Lambert, CTO - chris@whitecrown.net WhiteCrown Networks - More Than White Hats Web Application Security - www.whitecrown.net */ ----- Original Message ----- From: Francois Boucher <franky@iname.com> To: <php-general@lists.php.net> Sent: Friday, July 13, 2001 7:55 AM Subject: [PHP] Read and write | 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 =- | -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- | | | | -- | PHP General Mailing List (http://www.php.net/) | To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net | For additional commands, e-mail: php-general-help@lists.php.net | To contact the list administrators, e-mail: php-list-admin@lists.php.net | | |

« previous php.general (#57708) next »