session.handler.php 312 B

123456789101112131415161718192021222324252627
  1. <?php
  2. if(session_id() == '' || !isset($_SESSION)) {
  3. session_start();
  4. }
  5. if(!isset($_SESSION[_sid])) {
  6. $_SESSION[_sid] = [
  7. 'user' => [
  8. 'username' => 'admin',
  9. 'access' => [1,2,3,4,5],
  10. 'signin' => microtime()
  11. ],
  12. 'view' => 'dashboard'
  13. ];
  14. }
  15. ?>