ze strony http://forums.devshed.com/development-arti...html-88045.html
mam skrypt:
Kod:
<?php // htmlviewer.php // convert a Word doc to an HTML file //$DocumentPath = str_replace("\", "\", $DocumentPath); $DocumentPath="1.doc"; // create an instance of the Word application // creating an instance of the Word Document object $word->Visible = 0; // open up an empty document $wordDocument = $word->Documents->Open($DocumentPath); // create the filename for the HTML version // save the document as HTML $wordDocument->SaveAs($HTMLPath, 3); // clean up $wordDocument = null; $word->Quit(); $word = null; // redirect the browser to the newly-created document header("Location:". $HTMLPath); ?>
zgodnie z informacjami zawartymi tutaj:
http://us2.php.net/manual/pl/com.installation.php
i tutaj:
http://us2.php.net/manual/pl/com.configuration.php
stworzylem plik php.ini a w nim:
Kod: [com] ; path to a file containing GUIDs, IIDs or filenames of files with TypeLibs ;com.typelib_file = ; allow Distributed-COM calls com.allow_dcom = true ; autoregister constants of a components typlib on com_load() com.autoregister_typelib = true ; register constants casesensitive com.autoregister_casesensitive = true ; show warnings on duplicate constat registrations com.autoregister_verbose = true " title="Zobacz w manualu PHP" target="_manual
plik php.ini zapisalem w katalogu public_html na FTP.
ale wciaz jak uruchamiam skrypt krzyczy mi ze:
Kod: Fatal error: Cannot instantiate non-existent class: com in /home/website/public_html/word/index.php on line 17 " title="Zobacz w manualu PHP" target="_manual
problem tez w tym, ze po urzyciu komendy phpinfo(); nie widac tam informacji o COM.
HELP! :]