开发者

Zend_Amf & addDirectory() vs setClass()

Is anyone else having problems with Zend_Amf's addDirectory()?

It is supposed to autoload service classes and doesn't seem to. Though it works with setClass just fine. See snippet below.

Ive seen olders posts on ZF 1.8 that had a bug like this. Is it possible that this bug still exists or am I missing something?

I'm starting up the server the normal way, like so:

Fails

$server = new Zend_Amf_Server();
$server->addDirectory(APPLICATION_PATH . '/services/');
echo $server->开发者_C百科handle();

WORKS

$server = new Zend_Amf_Server();
$server->setClass('MyAmfService');
echo $server->handle();

Any help is appreciated

Thanks!


To answer my own question - it looks like the path was being picky. Im on a Windows box and changing

$server->addDirectory(APPLICATION_PATH . '/services/');

to

$server->addDirectory(APPLICATION_PATH . '\services\');

did the trick

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜