reneeshtk Posted June 11, 2007 Share Posted June 11, 2007 Hi all I have to read from a binary file 50th bytes to 100th bytes. any Idea.. I have just known this : foper("filename","rb"); If you know..Please help Advance thanks Quote Link to comment https://forums.phpfreaks.com/topic/55103-reading-byte-by-byte-from-a-binary-file/ Share on other sites More sharing options...
Lumio Posted June 11, 2007 Share Posted June 11, 2007 <?php $handle = fopen ("./file.txt", "r"); while (!feof($handle)) { $buffer = fread($handle, 1); echo $buffer."<br />\n"; } fclose ($handle); ?> Quote Link to comment https://forums.phpfreaks.com/topic/55103-reading-byte-by-byte-from-a-binary-file/#findComment-272441 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.