Question

On my site, when I call $this->baseUrl() in a view, it returns an empty string. I would expect it to return e.g. http://www.foobar.com/. Do I need to manually set base url?

In manual to Zend_Application_Resource_Frontcontroller - configuration keys, I have just found this:

baseUrl: explicit base URL to the application (normally auto-detected)

Any ideas why it is not autodetected for me?

Was it helpful?

Solution

The baseUrl() helper returns the path to your Zend Application.

Use the serverUrl() helper for the hostname.

OTHER TIPS

Did you set the baseurl in your application.ini?

resources.frontController.baseUrl = "/subdir"

Manual

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top