0

我一直面临一个奇怪的问题。

我有一个基于 zend 框架的应用程序,我需要使用来自另一个域的 IFrame 加载此应用程序。加载时,我需要将 IFrame 中的值传递给基于 Zend Framework 的应用程序。我尝试了以下方式,但它不起作用。它给出了页面未找到异常。

  1. 在引导程序中创建 _initRouting() 方法
  2. 使用 IFrame 集成应用程序

_initRouting()

public function _initRouting()
{
    $router = Zend_Controller_Front::getInstance()->getRouter();
    $router->addRoute(
            'deal',
            new Zend_Controller_Router_Route('/deal/:q', array(
                'module' => 'default',
                'controller' => 'index',
                'action' => 'index'
            ))
    );
}

IFrame 集成

<iframe src="http://www.example.com/deal/123" width="1022px" height="710px"></iframe>

默认模块->索引控制器->索引操作

public function indexAction()
{
    echo $this->_request->getParam('q');
}

想不通问题所在。您的帮助将不胜感激。

4

0 回答 0