2015-03-25 144 views
0

我试图手动安装PhpPowerpoint(不使用作曲家)PhpPowerpoint手动安装

我有WAMP有DOCUMENT_ROOT d安装:\ WAMP \ WWW \

我已经下复制的文件夹PhpPowerpoint以下路径d:\瓦帕\ WWW \ PHP \ PhpOffice \使用手动安装代码

(代码是在一个文件中d:\瓦帕\ WWW \ PHP \敏捷\ expMSPowerpoint.php):

require_once '../PhpOffice/PhpPowerpoint/Autoloader.php'; 
PhpOffice\PhpPowerpoint\Autoloader::register(); 
$objPHPPowerPoint = new PhpPowerpoint(); <<<< Error in this line 

我得到的错误:

致命错误:类 'PhpPowerpoint' 在d未找到:\ WAMP \ WWW \ PHP \敏捷\ expMSPowerpoint.php上线435

得到它安装任何帮助将是非常赞赏

回答

0

我建议使用PHP realpathhttp://php.net/manual/en/function.realpath.php

从手册页:

realpath() expands all symbolic links and resolves references to '/./', '/../' and extra '/' characters in the input path and returns the canonicalized absolute pathname.

+0

你也可能要检查的代码和PhpPowerpoint的目录是可执行的,并可供您的Web服务器用户使用。否则,尝试完整的路径,看看它是否有效 - 只是作为一个测试。 – 2015-03-25 14:47:06