Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

How to get full path URL

Hi :) I'm new to community nad have my hands on phalcon a week or so.

I need assistance because i can ot find a way to get full path url (add it in an email message) such as : "http://phalcon.mydomain.com/auth/confirmRegistration" the most i could get is "/auth/confirmRegistration" using $this->url->getStatic('auth/confirmRegistration')

there might be a build in function but i could not discover it, or maybe i should put the 'http://phalcon.mydomain.com' part in a global variable ??

thank you in advance



81.2k
Accepted
answer

Yes, set it on your url service:

$url->setBaseUri('http://phalcon.mydomain.com');


5.6k

thank you for your reply :)

actually i solved it like this : public/index.php define('BASE_URL', 'http://phalcon.mydomain.com');

because in url servive i set $url->setBaseUri('/'); an it works fine (so far)

since there are more than one options, do you suggest one of them for a particular reason or it is up to me ?

a side note : i try to restructure the authentication process because vokuro does not fit my needs in order to create a vanilla project for future use do you think that i should post here or in stcackoverflow whenever i have to address the community for assistance or advise ?