在ThinkPHP下要这么写 $word = new \COM("Word.Application") or die("Could not initialise Object."); 区别于一般PHP, 要使用\COM 参考文献: http://www.thinkphp.cn/topic/28501.html