Skip to content

Kirby 4.1.2

$kirby->root('sessions')

The storage folder for all session files

Example

<?= $kirby->root('sessions') ?>

Custom setup

If you want to overwrite the root you can do this in your index.php by passing a custom roots setup to the Kirby constructor.

/index.php
<?php

include 'kirby/bootstrap.php';

$kirby = new Kirby([
    'roots' => [
        'sessions' => '/absolute/path/to/custom/root',
    ],
]);

echo $kirby->render();