How to get current URL in CakePHP ?

Kausalya
Written by Kausalya

Posted On: Jan 11, 2019

 

    1 Answer Written

  •  Kausalya
    Posted by Eddierot

    Getting current URL in CakePHP In CakePHP View

    <?php echo $this->here; ?>
    

    In Controller

    	<?php echo Router::url( $this->here, true ); ?> 
    

Please Login or Register to leave a response.

Related Questions

Cakephp interview questions

What is CakePHP?

CakePHP&nbsp;is an&nbsp;&nbsp;open-source&nbsp;free web framework written in PHP scripting Language for rapid web development.&nbsp;CakePHP&nbsp;follows the&nbsp;model&ndash;view&ndash;controller (MVC...