1

我在一个页面上呈现了以下两个显示,但是第一个显示如何显示,而第二个视图没有显示...为什么?

<?php

    // include all the necessary file
    require_once(PATHS.'lib');

    $opts['title'] = PAGE_HEADER;
    $opts['tb'] = 'v_table_1';
    $opts['key'] = 'ID';

    $opts['buttons']['L']['up'] = $opts['buttons']['F']['up'] = $opts['buttons']['L']['down'] = $opts['buttons']['F']['down'] = array('<<','<','>','>>','goto_combo');

    $opts['options'] = 'F';         // A - add,  C - change, P - copy, V - view, D - delete, F - filter, I - initial sort suppressed

    $opts['fdd']['ID'] = array(
        'name'        => _('ID'),
        'select'    => 'T',
        'options'    => 'AVCPDLFX',
        'maxlen'    => 20,
        'sort'        => true,
    );

    $opts['fdd']['name'] = array(
        'name'        => _('Name'),
        'select'    => 'T',
        'options'    => 'AVCPDLFX',
        'maxlen'    => 20,
        'sort'        => true,
    );
    $opts['fdd']['age'] = array(
        'name'        => _('Age'),
        'select'    => 'T',
        'options'    => 'AVCPDLFX',
        'sort'        => true,
    );
    $pme_table1 = pme_render($opts, true);



    $opts['title'] = PAGE_HEADER;
    $opts['tb'] = 'v_table_2';
    $opts['key'] = 'ID';
    $opts['buttons']['L']['up'] = array('<<','<','>','>>','goto_combo');

    $opts['options'] = 'F';         // A - add,  C - change, P - copy, V - view, D - delete, F - filter, I - initial sort suppressed

    $opts['fdd']['ID2'] = array(
        'name'        => _('ID2'),
        'select'    => 'T',
        'options'    => 'AVCPDLFX',
        'maxlen'    => 20,
        'sort'        => true,
    );
    $opts['fdd']['name2'] = array(
        'name'        => _('Name2'),
        'select'    => 'T',
        'options'    => 'AVCPDLFX',
        'maxlen'    => 20,
        'sort'        => true,
    );
    $opts['fdd']['age2'] = array(
        'name'        => _('Age2'),
        'select'    => 'T',
        'options'    => 'AVCPDLFX',
        'maxlen'    => 50,
        'sort'        => true,
        'required'    => true,
    );
    $pme_table2 = pme_render($opts, true);

    require_once(APP_PATH.'header.php');

?>
    <ul class="nav nav-tabs">
        <li class="active">
            <a href="#table" data-toggle="tab"><?=_('Table1')?></a>
        </li>
        <li>
            <a href="#me" data-toggle="tab"><?=_('Table2')?></a>
        </li>
    </ul>

    <div class="tab-content">
        <div class="tab-pane active" id="table">
            <?php
                echo $pme_table1;
            ?>
        </div>
        <div class="tab-pane" id="me">
             <?php
                echo $pme_table2;
            ?>
        </div>
    </div>

上面的代码渲染两个选项卡,第一个选项卡从 v_table_1 中第一个渲染 pme_table1,但是下一个视图是空的,或者有时我可以看到错误说“phpMyEdit 错误:未定义数据库”?这是什么?为什么不两者都不能并排显示?

有人帮忙....

4

0 回答 0