I
I
iceman21122014-09-16 11:22:47
Yii
iceman2112, 2014-09-16 11:22:47

How to set absolute url in yii2?

Yii::$app->urlManager->createAbsoluteUrl(['/'])
Result from backend:
localhost/yii/backend/web

Answer the question

In order to leave comments, you need to log in

3 answer(s)
R
ryzhak, 2014-09-16
@ryzhak

you can use Url helper
www.yiiframework.com/doc-2.0/yii-helpers-baseurl.h...

A
Alexander Zelenin, 2014-09-16
@zelenin

What's the problem? they wanted an absolute url - they got it.

I
iceman2112, 2014-09-17
@iceman2112

this is absolute in this application, i want to get localhost/yii/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question