duanping2809 2011-07-14 00:04
浏览 56
已采纳

如何在Zend Framework中将URL作为URL的参数传递?

My question spawns from me sending an email to the user with something like the following:

http://mydomain.net/login/index/dest/%2Finvitation%2Fconfirm%2Fconfirmation_key%2F15116b5e4c61e4111ade679c10b3bf27

As you can see, what I'm trying to do is pass a url as the parameter "dest" so that the login page will know where to redirect after the user logs in. However, I'm presented with the following:

404 Not Found - /login/index/dest//invitation/confirm/confirmation_key/15116b5e4c61e4111ade679c10b3bf27

This is the View I use to create the email:

<p>
<?if($this->invitation->user):?>
<a href='<?=$this->serverUrl($this->baseUrl().$this->url(array(
    'action'=>'index',
    'controller'=>'login',
    'dest'=>$this->url(array(
        'action'=>'confirm',
        'controller'=>'invitation',
        'confirmation_key'=>$this->invitation->confirmation_key
    ))
)));?>'>Log in to confirm this invitation.</a>

//The view continues...

Any idea on how to keep this from translating the URI encoded items to their literal value would be greatly appreciated.

  • 写回答

3条回答 默认 最新

  • dsw1608 2011-07-14 00:23
    关注

    Can't you just send it over as a simpel GET parameter?

    Like http://mydomain.net/login/index/?redirect=/invitation/confirm/confirmation_key/15116b5e4c61e4111ade679c10b3bf27

    That's how it's mostly done actually.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

悬赏问题

  • ¥15 CVRP 图论 物流运输优化
  • ¥15 Tableau online 嵌入ppt失败
  • ¥100 支付宝网页转账系统不识别账号
  • ¥15 基于单片机的靶位控制系统
  • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
  • ¥15 下图接收小电路,谁知道原理
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度
  • ¥30 关于#r语言#的问题:如何对R语言中mfgarch包中构建的garch-midas模型进行样本内长期波动率预测和样本外长期波动率预测