如何获得types文件,如果条件使用yii框架

我有项目预览PowerPoint演示文稿或Excel文件。 这是我的代码

<?php /* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ if (count($dataJadwal) > 0) { // get a reference to the path of PHPExcel classes $phpExcelPath = Yii::getPathOfAlias('ext.phpexcel.Classes.PHPExcel'); // Turn off our amazing library autoload spl_autoload_unregister(array('YiiBase', 'autoload')); Yii::import('ext.phpexcel.Classes.PHPExcel', true); spl_autoload_register(array('YiiBase', 'autoload')); // // making use of our reference, include the main class // when we do this, phpExcel has its own autoload registration // procedure (PHPExcel_Autoloader::Register();) include($phpExcelPath . DIRECTORY_SEPARATOR . 'IOFactory.php'); //require_once("D:\server/www/cls/PHPExcel.php"); //require_once("D:\server/www/cls/PHPExcel/IOFactory.php"); $objPHPExcel = PHPExcel_IOFactory::load(urldecode($dataJadwal[0]['fileJadwal'])); $objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'HTML'); //$objWriter->save('example.html'); $objWriter->writeAllSheets(); $objWriter->save('php://output'); Yii::app()->clientScript->registerScript('cje', "$('table').addClass('table table-bordered table-condensed table-hover')"); } else { ?> <div class="alert alert-danger" style="width: 50%; font-size: 32px; margin: 0 auto; margin-top: 20%; text-align: center"><i class="fa fa-3x fa-warning"></i>Tidak ada data.</div> <?php } ?> 

我不知道如何获得已经上传的扩展名文件,如果扩展名是excel文件而不是运行phpexcel插件的代码,但是如果扩展名是powerpoint文件,代码将运行plugin phppowerpoint。

这是我的桌子在这里input图像说明