We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

To get back url

Everybody is good, phalcon is there a way to get back the url I want to request an error is returned if the user requests before the address, please each elder grant instruction

edited Oct '14

I think you can use in plain php

$_SERVER['REFERER_URI']

In phalcon you should use

$this->request->getServer('REFERER_URI', '\');

Read more about Phalcon Request https://docs.phalcon.io/en/latest/api/Phalcon_Http_Request.html#class-phalcon-http-request

Attention REFERER_URI sometimes can be null and provided by user browser

Another suggestion you can use hidden input

<input type="hidden" name="backurl" value="/fdsfsd/dsfsdfsd/sdfsd">

And get it after post for example