您的位置:首页 > 其它

Using url_for() in an Action

2011-11-09 08:24 288 查看
简介:这是Using url_for() in an Action的详细页面,介绍了和php,有关的知识、技巧、经验,和一些php源码等。

class='pingjiaF' frameborder='0' src='http://biancheng.dnbcw.info/pingjia.php?id=343147' scrolling='no'>原文: http://rndm-snippets.blogspot.com/2010/10/using-urlfor-in-action-symfony.html
In an symfony template you can get the base url of the application with:

url_for('@homepage', true);


Using this code in an action causes:

Fatal error: Call to undefined function url_for() in ...

In an action this code should be used instead:

$baseUrl = $this->getController()->genUrl('@homepage', true);







爱J2EE关注Java迈克尔杰克逊视频站JSON在线工具
http://biancheng.dnbcw.info/php/343147.html pageNo:5
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐