简体   繁体   中英

Include_Path, require once, PHP issues using Zend

I am new to PHP, so I apologize for my inexperience. I am working in a Windows 10 environment and have installed WAMP to serve Apache, PHP, and MySQL. I am creating some remoteObject webservices for an Adobe AIR app that will communicate with Zend using AMF, and I have created an index.php file to get everything in motion, but when I browse to the index.php file, I get all kinds of errors. Here is the index.php file:

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());
?>

My File structure is:

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

I tried to create a include_path in my php.ini file that looks like this, but it did not work:

include_path = “c:\wamp64\www\ZendFramework\library”

Finally, this is the error that I get when I browse to index.php in a browser:

( ! ) 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

Any help at all in getting this configured would really be appreciated. Thanks so much!

"In your question you appear to have smart quotes around the path, so that may be it. See if changing that helps. – Tim Fountain"

Thanks to Tim Fountain for answering this question, who noticed something I wouldn't have seen in a million years

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM