|
楼主 |
发表于 2017-2-22 15:00:16
|
显示全部楼层
- <?php $arr = getimagesize(base_url($row->cover) ); if( $arr['0'] >$arr['1'] ){$cc='width';}else{$cc='height';} ?>
- <div class="box">
- <div class="cover"><img src="<?php if( is_file($row->cover) ){echo base_url($row->cover);}else{echo base_url('assets/default.gif');} ?>" alt="img" <?php echo $cc; ?>="100%" />
- </div>
复制代码 |
|