我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

Cake PHP:Element内部的HTML Helper不起作用

I make a call like: $this->element('stories') in order to display the contents of this element named "stories" in multiple pages. When I use the html helper inside the element, I get the following error: Missing Helper Error: htmlHelper could not be found.

Note: I am using CakePHP 2.4

Thanks

You can use the html helper like..

<?php 
   // not echo $html->link('text', 'url'); 
   // not echo $this->html->link('text', 'url'); 
   echo $this->Html->link('text', 'url'); 
?>

Please check your code. Please have a look on the documentation.

近期文章

  • 从PHP传递JQPlot的值
  • 友好的网址和保持层次结构
  • 重置密码功能CakePHP
  • 将数据添加到codeigniter子视图 - 返回错误
  • WordPress - 如何添加/更新post_meta(自定义字段)?
  • Magento - 显示缺货产品时间执行
  • JQuery,Ajax,Json,PHP多维关联数组
  • 从数据库读取或写入数据库
  • 使用jQuery,Ajax和PHP返回/格式化HTML块 - 需要逻辑
  • 使用Requests for PHP库,如何设置自定义用户代理?
  • Symfony2 - fosuserbundle - 如何在注册表中限制生日
  • Magento:异常'Zend_Mail_Transport_Exception',消息'无法发送邮件
  • 二维数组
  • 用php显示错误
  • 学说中的一对多与多对一关系
  • SFTP未连接到远程服务器
  • 在codeigniter中进行多维输入数组检查
  • 删除在Key中使用不可打印字符创建的S3对象?
  • 用输入替换标题并更新数据库上的标题
  • 在Access中,在select查询中提供间距别名

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华