2017-10-05 102 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喷泉回答这个问题,谁发现了一些我不会在一百万年内看到