If you were using Yii 1 previously, it is likely you have a running Yii 1 application. Instead of rewriting the whole application in Yii 2, you may just want to enhance it using some of the features only available in Yii 2. This can be achieved as described below.
Note: Yii 2 requires PHP 5.4 or above. You should make sure that both your server and the existing application support this.
First, install Yii 2 in your existing application by following the instructions given in the last subsection.
Second, modify the entry script of the application as follows,
// include the customized Yii class described below
require(DIR . ‘/../components/Yii.php’);
// configuration for Yii 2 application--------------------------------------------------------------------hi, softark thanks your reply. you can see this.
Maybe you could use iframes to a separate yii2 app. This may also help with a gradual move from yii1 to yii2. I saw a thread a while back about sharing sessions but I don’t know if it was successful.