I have a script to export some data from SQL and format into Excel which is all working fine, for 3 out of 4 things I'm trying to export.. the final one is reporting the following :
Warning: fopen(/home/a/public_html/private/b/c/d/e/f/Martin's-g-23-11-2015.xls): failed to open stream: No such file or directory in /home/a/public_html/b/classes/Classes/PHPExcel/Shared/OLE/PPS/Root.php on line 90
This fine dose exist as this script worked fine for the other divisions just not Martin's. It also reports the following:
Fatal error: Uncaught exception 'Exception' with message 'Can't open /home/a/public_html/private/b/c/d/e/f/Martin's-g-23-11-2015.xls. It may be in use or protected.' in /home/a/public_html/b/classes/Classes/PHPExcel/Shared/OLE/PPS/Root.php:93 Stack trace: #0 /home/a/public_html/b/classes/Classes/PHPExcel/Writer/Excel5.php(233): PHPExcel_Shared_OLE_PPS_Root->save('/home/a/pu...') #1 /home/a/public_html/private/b/c/d/e/exportOther.php(66): PHPExcel_Writer_Excel5->save('/home/a/pu...') #2 {main} thrown in /home/a/public_html/b/classes/Classes/PHPExcel/Shared/OLE/PPS/Root.php on line 93
I'm stumped why this errors whilst everything else works, they all run off the same script so the fact its reporting permissions errors(?) is weird.. I've used htmlspecialchars for the name so Martin's shouldn't be effecting it and ufortunatly it has to be stored that way as it is captured from files provided to us.
Does anyone here know what is causing this error?
EDIT - printing out everything it decided to throw another random / before the Martin's when there shouldn't have been all sorted now sorry! (and thanks)