Label.php 790 B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. namespace app\index\controller;
  3. use think\Controller;
  4. class Label extends Base
  5. {
  6. public function __construct()
  7. {
  8. parent::__construct();
  9. $dispatch = request()->dispatch();
  10. if (isset($dispatch['module'])) {
  11. $file = $dispatch['module'][2];
  12. $param = mac_param_url();
  13. if(!empty($param['file'])){
  14. $file = $param['file'];
  15. }
  16. $file = str_replace('\\','/',$file);
  17. if(!file_exists($GLOBALS['MAC_ROOT_TEMPLATE'] . 'label/'. $file.'.html') || strpos($file,'/')!==false){
  18. return $this->error(lang('illegal_request'));
  19. }
  20. echo $this->label_fetch('label/'.$file);
  21. }
  22. exit;
  23. }
  24. public function index()
  25. {
  26. }
  27. }