2014-10-13 4 views

답변

1

실행/전달되는 모든 경로는 Action으로 이루어집니다. 그래서 기본적으로 index.php 당신이 route GET 매개 변수가 설정되어있는 경우 경로를로드 할 필요가, 또는 아무것도 설정되어 있지 않은 경우 common/home 여부를 결정

// Router 
if (isset($request->get['route'])) { 
    $action = new Action($request->get['route']); 
} else { 
    $action = new Action('common/home'); 
} 

사용 (즉, 도메인은 http://yoursite.com/ 대신 http://www.yoursite.com/index.php?route=common/home의 경우)

마찬가지로 권한이 부여되지 않으면 액션은 유효하지 않을 때 error/permission 경로를 렌더링합니다. 이것은이 코드 특별히 (OC V2.0.0.0b) 당신이 후드를 작동하는 방법에 대한 자세한 내용을 원한다면

if (!in_array($route, $ignore) && !$this->user->hasPermission('access', $route)) { 
    return new Action('error/permission'); 
} 

것은, 당신이 /system/engine/action.php

좀 걸릴 수 있습니다에 /admin/controller/error/permission.php에 체크
관련 문제