Пример #1
0
 private static function sendFile($base)
 {
     array_shift(self::$urlTokens);
     $filePath = escapeshellcmd(implode('/', self::$urlTokens));
     if ($filePath == 'index.php') {
         \Config::loadUserFiles($_ENV['pageNotFound'], 'control', array('page'));
     }
     $path = $base . $filePath;
     if ($_ENV['downloadParamIndicator']) {
         $saveAs = $_GET[$_ENV['downloadParamIndicator']] ? $_GET[$_ENV['downloadParamIndicator']] : $_POST[$_ENV['downloadParamIndicator']];
     }
     \View::sendFile($path, $saveAs);
 }
Пример #2
0
 static function req($path)
 {
     $file = \Config::userFileLocation($path, 'control') . '.php';
     return \Files::req($file, array('control'));
 }