Вывод ошибки если не открывается файл
This commit is contained in:
parent
13a3f1cac7
commit
e46867b134
1 changed files with 3 additions and 1 deletions
|
|
@ -76,7 +76,9 @@ class Excel_Document {
|
|||
function save($filename)
|
||||
{
|
||||
$doc = new XMLWriter();
|
||||
$doc->openURI($filename);
|
||||
if (!$doc->openURI($filename)) {
|
||||
throw new Exception("unknown file " . $filename);
|
||||
}
|
||||
$doc->setIndent(false);
|
||||
$doc->startDocument('1.0','utf-8');
|
||||
$doc->startElement('Workbook');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue