false), true); $default_config->merge(new Zend_Config_Ini($configfile, 'zendamf')); $default_config->setReadOnly(); $amf = $default_config->amf; // Store configuration in the registry Zend_Registry::set("amf-config", $amf); // Initialize AMF Server $server = new Zend_Amf_Server(); $server->setProduction($amf->production); if(isset($amf->directories)) { $dirs = $amf->directories->toArray(); foreach($dirs as $dir) { // get the first character of the path. // If it does not start with slash then it implies that the path is relative to webroot. Else it will be treated as absolute path //echo "
$dir !!"; $length = strlen($dir); $firstChar = $dir; if($length >= 1) $firstChar = $dir[0]; if($firstChar != "/"){ // if the directory is ./ path then we add the webroot only. if($dir == "./"){ $server->addDirectory($webroot); }else{ $tempPath = $webroot . "/" . $dir; $server->addDirectory($tempPath); } }else{ $server->addDirectory($dir); } } } // Initialize introspector for non-production if(!$amf->production) { $server->setClass('Zend_Amf_Adobe_Introspector', '', array("config" => $default_config, "server" => $server)); $server->setClass('Zend_Amf_Adobe_DbInspector', '', array("config" => $default_config, "server" => $server)); } // Handle request echo $server->handle();