My phalcon app is in folder /_test-php-framework/phalcon/
And i'm already set application->baseUri = /_test-php-framework/phalcon/
In config/services.php i have this code running
$di = new FactoryDefault();
/**
* The URL component is used to generate all kind of urls in the application
*/
$di->set('url', function () use ($config) {
$url = new UrlResolver();
$url->setBaseUri($config->application->baseUri);
return $url;
});
Everythingelse works find except when i call to getBaseUri()
.
$url = new Phalcon\Mvc\Url();
echo $url->getBaseUri()."<br>\n";
The result should be /_test-php-framework/phalcon/ but it becomes /public/
How to get its value correctly?