$fp = fopen($file,"rb+");
$char = fgetc($fp);
if ($char == 0x4d)
{
echo "found it! ";
}
The first byte of this file is 4d hex, or "M" ASCII. This code won't find it. If I change to:
if ($char == "M")
Then is does trap the byte. What am I doing wrong?