2015-03-25 146 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