Hello, yesterday I tried to send an excel file using php. The file was corrupted and after a lot of effort (and luck) I realised that php(or something in the process) was adding an extr byte at the beginning of the file. This is the php code I used: <? define('FILEDIR', '/home/content/h/l/l/hlluch/html/'); $path = FILEDIR . $file; //send file contents $fp=fopen($path, "r"); fpassthru($fp); ?> Does anyone know why this is happening? Thanks.
Hello, I have solved my problem. <? had to be the first thing on the php file. I am not a php expert and I didn't recall it. But I am surprised that no one thought of that.