Skip to content
Advertisement

How to get complete current url for Cakephp

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

Advertisement

Answer

You can do either

From a view file:

JavaScript

Which will give you the absolute url from the hostname i.e. /controller/action/params

Or

JavaScript

which should give you the full url with the hostname.

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement