par
hashut » 18 juin 2008, 16:55
Salut
je voudrais convertir fichier.doc en fichier.html
<?php
//an easy way to convert your file from .doc to .html
// starting word
$word = new COM("word.application") or die("Unable to instanciate Word");
// if you want see thw World interface the value must be '1' else '0'
$word->Visible = 1;
//doc file location
$word->Documents->Open("./ficier.doc");
//html file location '8' mean HTML format
$word->Documents[1]->SaveAs("./fichier.html",8);
//closing word
$word->Quit();
//free the object from the memory
$word->Release();
$word = null;
?>
j'ai le code erreur
Code : Tout sélectionner
Fatal error: Class 'COM' not found in /var/www/vhost/domain.com/home/html/test/test.php on line 6
[/b]
vous pouvez m'aide SVP ?
Salut
je voudrais convertir fichier.doc en fichier.html
[php]
<?php
//an easy way to convert your file from .doc to .html
// starting word
$word = new COM("word.application") or die("Unable to instanciate Word");
// if you want see thw World interface the value must be '1' else '0'
$word->Visible = 1;
//doc file location
$word->Documents->Open("./ficier.doc");
//html file location '8' mean HTML format
$word->Documents[1]->SaveAs("./fichier.html",8);
//closing word
$word->Quit();
//free the object from the memory
$word->Release();
$word = null;
?> [/php]
j'ai le code erreur
[b][code]
Fatal error: Class 'COM' not found in /var/www/vhost/domain.com/home/html/test/test.php on line 6
[/code][/b]
vous pouvez m'aide SVP ?