note 101934 rejected from class.com by thiago
| From: | thiago@php.net | Date: | Wed, 19 Jan 2011 05:07:14 +0000 |
| Subject: | note 101934 rejected from class.com by thiago | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-175883@lists.php.net to get a copy of this message | ||
Note Submitter: phamhphuc dot bk at gmail dot com
----
I took a script as below:
$app = new COM("PowerPoint.application") or die("Unable to instantiate
PowerPoint");
$app->Visible = true;
$pres = $app->Presentations->Open("C:/tmp/chapter.ppt") or die ("Could not open
presentation");
The funny thing is that it run good in Window 7 but can't open file in windows server 2008 RC2
even though it instantiated PowerPoint and the is exists. I tried with many types of file dir:
"C://tmp/chapter.ppt", "C:\\tmp\\chapter.ppt",
"C:\\\\tmp\\chapter.ppt", "C:/tmp/chapter.ppt" and used realpath for them but
all of things is unbelievable because it can't open and through error:
Fatal error: Uncaught exception 'com_exception' with message
'<b>Source:</b> Microsoft Office PowerPoint
2007<br/><b>Description:</b> PowerPoint could not open the file.' in
C:\wamp\www\test\phpconvert.php:9 Stack trace: #0 C:\wamp\www\test\phpconvert.php(9):
variant->Open('C:/tmp/chapter....') #1 {main} thrown in C:\wamp\www\test\phpconvert.php
on line 9
I am really need your helps.
Thanks