【问题标题】:what is difference between $this->requestElement() and $this->element();$this->requestElement() 和 $this->element() 有什么区别?
【发布时间】:2011-11-17 06:30:14
【问题描述】:

我使用 cakephp,我是初学者 我用

$this->requestElement() 

default.ctp

文件,但我遇到错误。
但是当使用

$this->元素()

我的问题解决了。
我面临的问题是$this->requestElement()$this->element(); 之间有什么区别 当我使用requestElement() 和当我使用element() 时? 感谢您的帮助。

【问题讨论】:

    标签: cakephp html-helper


    【解决方案1】:

    requestElement 已过时/不推荐使用(在 1.3 之前使用)。

    你现在应该使用 element()

    【讨论】:

      【解决方案2】:

      我不确定您在哪里找到了 requestElement() 方法,但我在 API 文档中找不到它。如果该方法曾经存在,它很可能在以后的 Cake 版本中被弃用。

      或者你的意思是requestAction()

      【讨论】:

        【解决方案3】:

        您可能指的是renderElement,而不是requestElementrenderElement 在 CakePHP 1.2 中被弃用,并在以后的版本中被删除。

        【讨论】:

          猜你喜欢
          • 2010-11-06
          • 2011-04-12
          • 1970-01-01
          • 1970-01-01
          • 2013-08-09
          • 2011-04-10
          • 2013-05-26
          • 2012-10-06
          相关资源
          最近更新 更多