コード例 #1
0
ファイル: index.php プロジェクト: tanuxaZ/parseExcelFiles
        echo $error . '<br>';
    }
    ?>
                    </p>
                <?php 
}
?>
                <p><input type="file" name="uploadFile" value=""></p>
                <p class="submit"><input type="submit" name="getData" value="Получить данные"></p>
            </form>

            <?php 
if (isset($_POST) && array_key_exists('getData', $_POST)) {
    require_once '/modules/parseFile.php';
    $file = new parseFile();
    $xmlObj = $file->getXMLObj('uploadFile');
    $arrData = $file->getDataArray();
    $arrTitle = $file->getTitleArray();
    $er = $file->error;
}
?>
            <?php 
if ($arrTitle && is_array($arrTitle) && count($arrTitle) > 0) {
    foreach ($arrTitle as $listNum => $titles) {
        echo '<table>';
        echo "<tr>";
        foreach ($titles as $columnNum => $title) {
            echo "<td>{$title}</td>";
        }
        echo "</tr>";
        if ($arrData && is_array($arrData) && count($arrData) > 0) {