PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
mickey
Forum Newbie
Posts: 24 Joined: Thu May 01, 2003 11:14 am
Location: Philippines
Post
by mickey » Sun Jun 22, 2003 12:32 am
hello,
i need to open a file and show it's contents as hex...
any ideas how? is there a function in PHP that will do this? byte per byte?
for instance,
$filePointer = fopen("logo.otb", "r");
$byte = fgets($filePointer, 1); // read byte per byte
// now how do i print byte as hex?
many thanks.
volka
DevNet Evangelist
Posts: 8391 Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger
Post
by volka » Sun Jun 22, 2003 1:25 am
mickey
Forum Newbie
Posts: 24 Joined: Thu May 01, 2003 11:14 am
Location: Philippines
Post
by mickey » Sun Jun 22, 2003 8:45 am
right, thanks a lot.