Twitter bootstrap 使用yii引导扩展后,我的屏幕变白了,不知道为什么?

Twitter bootstrap 使用yii引导扩展后,我的屏幕变白了,不知道为什么?,twitter-bootstrap,yii,Twitter Bootstrap,Yii,我使用了bootsrap YII扩展。它在我的本地主机上运行良好,但在我转移到服务器时就不起作用了。我得到的只是白色屏幕。当我删除表单以生成代码时,它工作正常。这是我的密码。我知道引导程序正在生成错误,但不知道是哪一行 <?php $form = $this->beginWidget('bootstrap.widgets.BootActiveForm', array( 'id' => 'registration-form', 'type' => '

我使用了bootsrap YII扩展。它在我的本地主机上运行良好,但在我转移到服务器时就不起作用了。我得到的只是白色屏幕。当我删除表单以生成代码时,它工作正常。这是我的密码。我知道引导程序正在生成错误,但不知道是哪一行

    <?php
$form = $this->beginWidget('bootstrap.widgets.BootActiveForm', array(
    'id' => 'registration-form',
    'type' => 'horizontal',
    'enableAjaxValidation' => true,
    //'enableClientValidation'=>true,
    'clientOptions' => array(
        'validateOnSubmit' => true,
    )
        ));
?>
<?php echo $form->dropDownListRow($model, 'user_type', $model->getUserType(), array('class' => 'span4')); ?>
<?php echo $form->textFieldRow($model, 'user_id', array('class' => 'span4', 'placeholder' => 'Enter 6 digit pin which you can easily remember')); ?>
<?php echo $form->textFieldRow($model, 'username', array('class' => 'span4', 'placeholder' => 'Username')); ?>
<?php echo $form->passwordFieldRow($model, 'password_real', array('class' => 'span4', 'maxlength' => 30, 'placeholder' => 'Password')); ?>
<?php echo $form->passwordFieldRow($model, 'repeat_password', array('class' => 'span4', 'maxlength' => 30, 'placeholder' => 'Do not copy from above')); ?>
<?php echo $form->textFieldRow($model, 'firstname', array('class' => 'span4', 'placeholder' => 'Initial name')); ?>
<?php echo $form->textFieldRow($model, 'lastname', array('class' => 'span4', 'placeholder' => 'Family name')); ?>
<?php echo $form->textFieldRow($model, 'email', array('class' => 'span4', 'placeholder' => 'This will not be revealed')); ?>
<div class="control-group">
    <?php echo $form->labelEx($model, 'dob', array('class' => 'control-label')); ?>
    <div class="controls">
        <?php
        $this->widget('zii.widgets.jui.CJuiDatePicker', array(
            'model' => $model,
            'attribute' => 'dob',
            // additional javascript options for the date picker plugin
            'options' => array(
                //'showAnim'=>'fold',
                'changeMonth' => true,
                'changeYear' => true,
                'maxDate' => '-18y',
            ),
            'htmlOptions' => array(
                'class' => 'span4',
                'placeholder' => 'Choose from Date picker'
            ),
        ));
        ?></div>
    <?php echo $form->error($model, 'dob'); ?>
</div>
<?php echo $form->textFieldRow($model, 'profession', array('class' => 'span4', 'maxlength' => 255)); ?>

<?php echo $form->textFieldRow($model, 'hobby', array('class' => 'span4', 'maxlength' => 255, 'placeholder' => 'What you like most')); ?>
<div class="control-group" id="heightDiv">
    <?php echo $form->labelEx($model, 'height', array('class' => 'control-label')); ?>

    <div class="controls"><?php echo $form->textField($model, 'height', array('class' => 'span4', 'maxlength' => 20, 'placeholder' => 'Enter in CM')); ?> CM
        <?php echo $form->error($model, 'height'); ?></div>
</div>
<div class="control-group" id="weightDiv">
    <?php echo $form->labelEx($model, 'weight', array('class' => 'control-label')); ?>

    <div class="controls"><?php echo $form->textField($model, 'weight', array('class' => 'span4', 'maxlength' => 20, 'placeholder' => 'Enter in KG')); ?> KG
        <?php echo $form->error($model, 'weight'); ?></div>
</div>
<div class="control-group" id="weightTDiv">
    <?php echo $form::labelEx($model, 'weight_taken_on', array('class' => 'control-label')); ?>
    <div class="controls">

        <?php
        $this->widget('zii.widgets.jui.CJuiDatePicker', array(
            'model' => $model,
            'attribute' => 'weight_taken_on',
            // additional javascript options for the date picker plugin
            'options' => array(
                'showAnim' => 'fold',
                'changeMonth' => 'true',
                'changeYear' => 'true',
                'maxDate' => 'y',
            ),
            'htmlOptions' => array(
                'class' => 'span4',
                'placeholder' => 'Choose from Date picker'
            ),
        ));
        ?>
    </div>
</div>
<div class="line"></div>
<div class="control-group">
    <div class="controls">
        <?php
        $this->widget('bootstrap.widgets.BootButton', array(
            'buttonType' => 'submit',
            'type' => 'primary',
            'size' => 'large',
            'label' => $submit_btn,
        ));
        ?>
    </div>
</div>

<?php $this->endWidget(); ?>

厘米
公斤

您的代码看起来很好,除了上面的一行:

<?php echo $form::labelEx($model, 'weight_taken_on', array('class' => 'control-label')); ?>

换成

<?php echo $form->labelEx($model, 'weight_taken_on', array('class' => 'control-label')); ?>


它应该会起作用

你的代码看起来很好,除了在上面写着

<?php echo $form::labelEx($model, 'weight_taken_on', array('class' => 'control-label')); ?>

换成

<?php echo $form->labelEx($model, 'weight_taken_on', array('class' => 'control-label')); ?>


它应该会起作用

错误报告打开了吗?错误报告打开了吗?那是血淋淋的好斑点,漂亮的捕获物那是血淋淋的好斑点,漂亮的捕获物