Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Check out results in damanged / corrupt file
#1
Hi,

My brother in law had a problem with checking out files. When he did that and downloaded the file he could not open it. The file was corrupted. He already discovered that there was a single byte (space) added to file file at the first position.

After some investigation i discovered the problem. The php code just returns the file that fine. The only problem is that the buffer was not empty and that is contained a single space. So a space is returned with the file content attached. So maybe it's a good idea to clear the buffers just before the php code returns the file, so it will works always. But were is the space coming from? In this case it was inside the dutch php language file. The first spot in the file, outside the php tags there is a space. Removing the space character solved the issue in this case.


Regards,
Arjan de Vries


Forum Jump:


Users browsing this thread: 1 Guest(s)