$session in other script

Hello, everybody,
I don’t have a clue about yii and need the $session object/array in another script which doesn’t belong to yii. Unfortunately I haven’t found anything about it yet, especially because OOP is not my strength.

In the htdocs directory I created another file, which is also callable and can be populated by me.

Then I integrated the following into my file:

require_once(’…/yf/vendor/yiisoft/yii/framework/yii.php’);
$configFile=’…/yf/config/main.php’;
Yii::createWebApplication($configFile)->run();

This also works so far, but it also loads content (header/footer) that I don’t need.

Now I have found renderPartial(), but don’t know how to use it, so I have an empty page where the $session variable is available.

Can someone give me a hint?

Thank you.

Can you try removing the call to run() ?

$yiiApp = Yii::createWebApplication($configFile);