On 8/04/2010 1:51 PM, Mark Steudel wrote:
Using the same Flash code I was able to get this working where I just
included the Zend library in a normal file, I wondering if there's
something else I need to do in order to get AMF working so that it
routes through the normal framework.

Here's the code that works

<?php

ini_set( "include_path", ini_get("include_path") . PATH_SEPARATOR .
dirname( dirname( __FILE__ ) ) . "/Zend/library");

require_once( 'Zend/Amf/Server.php' );
require_once( 'Tutorials.php' );

$server = new Zend_Amf_Server();
$server->setClass("Tutorials");

echo( $server->handle() );


Mark,

I haven't used Amf myself, so I may be way off. But you probably need to disable the default view rendering (since you're echoing from the controller - I'd pass that to the view and do it there, but that's another issue).

Both the view and the layout (if enabled) could be adding "junk" to the output, and as it's a binary format that would be enough to break it.

--

Brenton Alker
Developer - Brisbane, Australia

Reply via email to