2017-10-05 103 views
0

我是PHP的新手,所以我爲我的經驗不足而道歉。我正在Windows 10環境中工作,並已安裝WAMP來爲Apache,PHP和MySQL提供服務。我正在爲Adobe AIR應用程序創建一些remoteObject web服務,該應用程序將使用AMF與Zend進行通信,並創建了一個index.php文件以使所有內容都處於運動狀態,但是當我瀏覽到index.php文件時,錯誤。這裏是index.php文件:Include_Path,需要一次,使用Zend的PHP問題

的index.php

<?php 
    require_once('Zend/Amf/Server.php'); 
    require_once('HalfService.php'); 

    $server = new Zend_Amf_Server(); 
    //adding our class to Zend AMF Server 
    $server->setClass("HalfService"); 
    //Mapping the ActionScript VO to the PHP VO 
    //you don't have to add the package name 
    $server->setClassMap("VOService", "VOService"); 
    echo($server -> handle()); 
?> 

我的文件結構是:

C:/wamp64/www/ 
       ZendFramework/library/Zend/Amf/Server.php 
       zendamf_remote/index.php 
          HalfService.php 
          VOService.php 

我試圖創建在我的php.ini文件中的include_path看起來像這樣,但它沒有工作:

include_path = 「c:\wamp64\www\ZendFramework\library」 

最後,這是錯誤的或者我在瀏覽器中瀏覽到index.php時得到的內容:

(!) Warning: require_once(Zend/Amf/Server.php): failed to open stream: No such file or directory in C:\wamp64\www\zendamf_remote\index.php on line 2 

(!) Fatal error: require_once(): Failed opening required 'Zend/Amf/Server.php' (include_path='�c:\wamp64\www\ZendFramework\library�') in C:\wamp64\www\zendamf_remote\index.php on line 2 

任何幫助完成此配置真的很感激。非常感謝!

+0

您可能還需要Zend自動加載器。你是否可以用作曲家來做這件事? –

+0

您是否嘗試過include_path =「c:/ wamp64/www/ZendFramework/library」 – shashi

+0

您是否在包含路徑中嘗試了正斜槓?反斜線可能被當作轉義字符處理 –

回答

0

「在你的問題,你似乎有路徑周圍智能引號,這樣可能會看到它,如果改變這種幫助。 - 蒂姆噴泉」

感謝Tim噴泉回答這個問題,誰發現了一些我不會在一百萬年內看到