php - PHPExcel outputing different files in different servers -
Recently I had to change my application to another server and everything was fine, but I used to have files using XLSX PHPExcel The server compared a good file to a new file since XLSX is just a zip file, so I made it unexpected to compare them. There was no difference then, I compared them to Notepad ++ and the binary string on both is different. I think there is something like that with encoding, but I'm actually lost here.
Useful Information
Header:
-> SetWarwer ("End: Mon, 26 July 1997 05:00:00 GMT") - & gt; SetRAF Header ("Final-Modified:". GMDAT ("D, D MYH: i: s"). "SetRawHeader (" Cache-Control: No-Cache, Must-Modify ") - & gt; Satvideo (" Pragma : "No-cache") -> SetrWader ("Content-Type: App / vnd.openxmlformatsofficedocument .spreadsheetml.sheet") - & gt; setRawHeader ("Content-Disposal: Attachment; File Name = \" {$ file} \ "" -> gt; SetrWeder ("Content-Description: PHP Generation Data");
Saving:
$ objWriter = New PHPExcel_Writer_Excel2007 ($ excel); $ ObjWriter- & gt; save ('php: // orig Done ');
-
There is no garbage output before the file byte stream;BOMs - The same code for both servers
- The file that is generated on the new server is throwing an invalid file error on the axle;
- both server windows and apache are running;
- $ file first set
Thanks!
Comments
Post a Comment