File size: 669 Bytes
a4a352b |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
<?php
namespace app\common\behavior;
class Begin
{
public function run(&$params)
{
$module = '';
$dispatch = request()->dispatch();
if (isset($dispatch['module'])) {
$module = $dispatch['module'][0];
}
if( $module =='install'){
return;
}
if(defined('ENTRANCE') && ENTRANCE == 'admin') {
if ($module == '') {
header('Location: '.url('admin/index/index'));
exit;
}
if ($module != 'admin' ) {
header('Location: '.url('admin/index/index'));
exit;
}
}
}
} |