yii模版中的判断方法,
<?php if(!$model->isNewRecord):?>
<tr>
<th width="100px" class="bh-algRt"><?php echo $form->label($model,'order_sn'); ?>:</th>
<td width="300px" colspan=3><?php echo $model->order_sn?></td>
</tr>
<?php endif?>
不用解释了,看看就明白。
yii模版中的判断方法,
<?php if(!$model->isNewRecord):?>
<tr>
<th width="100px" class="bh-algRt"><?php echo $form->label($model,'order_sn'); ?>:</th>
<td width="300px" colspan=3><?php echo $model->order_sn?></td>
</tr>
<?php endif?>
转载于:https://www.cnblogs.com/iplus/archive/2012/04/26/4489979.html