php-general | 2001092
Date: 09/28/01
- Next message: Lukas: "[PHP] Re: Problem getting cron job work with php"
- Previous message: Boaz Yahav: "[PHP] Web Based Rich Text Editor"
- In reply to: Andris Jancevskis: "[PHP] How put hex value into file?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
write it as a string:
$fs=fopen($file,"wb");
$info="0x10100000"
fputs($fs,$info);
fclose($fs);
or use the sprintf() with the "%x" modifier.
"Andris Jancevskis" <ajandris <email protected>> wrote in message
news:6293562776.20010928132827 <email protected>
> Hi!
>
> I want to insert hex value into file (not decimal value in hex).
> Code below doesn't work (it inserts 269484032). I'm puzzled.
>
> $fs=fopen($file,"wb");
> $info=0x10100000;
> fputs($fs,$info);
> fclose($fs);
>
> I want put into this file ASII characters too.
> gettype says that $info is an integer.
>
> Thanx,
> Andris
> mailto:ajandris <email protected>
>
>
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe <email protected> For additional commands, e-mail: php-general-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Lukas: "[PHP] Re: Problem getting cron job work with php"
- Previous message: Boaz Yahav: "[PHP] Web Based Rich Text Editor"
- In reply to: Andris Jancevskis: "[PHP] How put hex value into file?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

