Index.php 497 B

1234567891011121314151617181920212223242526
  1. <?php
  2. namespace addons\previewfile\controller;
  3. use think\addons\Controller;
  4. use think\Config;
  5. use think\Hook;
  6. class Index extends Controller
  7. {
  8. public function index()
  9. {
  10. $url = $this->request->param('url');
  11. $parse_info = parse_url($url);
  12. $ext_info = substr(strrchr($parse_info['path'],"."),1);
  13. $this->view->assign('ext_info',$ext_info);
  14. $this->view->assign('url',$url);
  15. return $this->view->fetch();
  16. }
  17. }