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 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); ?> 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
Archived
This topic is now archived and is closed to further replies.