How to get complete current url for Cakephp

前端 未结 24 1285
长情又很酷
长情又很酷 2020-12-08 00:10

How do you echo out current URL in Cake\'s view?

24条回答
  •  不知归路
    2020-12-08 00:43

    In View:

    Blank URL: Html->Url('/') ?>
    Blank Full Url: Html->Url('/', true) ?>
    Current URL: Html->Url($this->here) ?>
    Current Full URL: Html->Url($this->here, true) ?>
    

    In Controller

    Blank URL: 
    Blank Full Url: 
    Current URL: request->here()) ?>
    Current Full URL: request->here(), true) ?>
    

提交回复
热议问题