Migration de la CLASS COM en PHP7
Je suis actuellement entrain de passer en PHP V7 ma fonction class COM que j'utilisais en PHP V5 ne fonctionne plus avec le message appel d'une fonction non défini
Version PHP courante : 7.4.25
Citation:
PHP Fatal error: Uncaught Error: Call to undefined
function com_load_typelib() in C:\php-DocEngine\phpcode\phpdoc2.php:8
Stack trace:
Code phpdoc2.php
Code:
1 2 3 4 5 6 7 8 9 10 11
| <?php
echo 'Version PHP courante : ' . phpversion();
// Some servers may have an auto timeout, so take as long as you want.
set_time_limit(0);
// Show all errors, warnings and notices whilst developing.
error_reporting(E_ALL);
// Load the appropriate type library.
com_load_typelib('Word.Application');
$word = new COM("word.application") or die("Unable to instantiate Word");
echo "Loaded Word, version {$word->Version}\n";
?> |