[PHP] Read and write

2001-07-13 Thread Francois Boucher

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  =-
-=  [EMAIL PROTECTED] =-
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] connection problème!

2001-04-21 Thread Francois Boucher

I wrote this code but nothing append.  If i look de code in the browser it's
stopping to starting!

What is the problème?


HTMLBODY
?php
echo "starting...";
if ( mysql_connect("localhost","php","php") )
  { echo "ok"; }
else
echo "error!";

?
/BODY/HTML

--
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-=   François Boucher  =-
-=  [EMAIL PROTECTED]=-
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-=   François Boucher  =-
-=  [EMAIL PROTECTED]=-
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]