Home > Backend Development > PHP Tutorial > PHP WORD COM 组件问题

PHP WORD COM 组件问题

WBOY
Release: 2016-06-23 13:26:10
Original
1144 people have browsed it

     今天需要用到php 来操作word,系统里面没配置,然后自己配置了如下:
1, php ext 文件夹下有php_com_dotnet.dll这个文件;
2,php.ini里面添加了com.allow_dcom = true和extension=php_com_dotnet.dll
3, 管理设备中的com也已经打开了。但是当我输入这样的一个测试程序的时候:

  $word = new COM("word.application") or die("Unable to instantiate Word");
  echo "Loaded Word, version {$word->Version}\n";

?>
出现了这样的报错:
! ) Fatal error: Class 'COM' not found in D:\wamp\www\test\word.php on line 3
Call Stack
# Time Memory Function Location
1 0.0000 141624 {main}( ) ..\word.php:0
想请教一下,这个是为什么?


回复讨论(解决方案)

换了一种做法,具体请看这个博客!写得挺好!http://blog.csdn.net/pqhdp/article/details/5626758

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template