Reputation: 1623
I run a zf2 application in localhost/zf2
locally. I want to retrieve the application base URL(for example http://localhost/
) in my model.
How can I get the localhost
part of URL in model?
Or, how I recognize the project is online or offline?
Upvotes: 1
Views: 594
Reputation: 4330
It is wrong with MVC architecture. If u want use baseUrl in model, pass baseUrl to model from controller.
But I also was add question to do that when i use ZF1. Sometime it will useful for you.
Upvotes: 1