版本:1.0.17
(1)打开:app\modules\session\index.php
把
if (!isset($app['session.options']['cookie_path'])) {
$app['session.storage']->setOptions(['cookie_path' => $request->getBasePath() ?: '/']);
}
改为:
if (session_status() == PHP_SESSION_NONE && !isset($app['session.options']['cookie_path'])) {
$app['session.storage']->setOptions(['cookie_path' => $request->getBasePath() ?: '/']);
}
参考:https://github.com/pagekit/pagekit/issues/913
(2)打开:app\system\modules\theme\views\error.php 在这里修改代码
参考:https://pagekit-forum.org/forum/thread/22-how-to-customize-404-page/