Hi!
I’m trying to display an image in a CSS <div> tag using Chtml::image() but the browser just display a box.
here is the code :
<div class="view">
<table>
<tr>
<td>
<b><?php echo CHtml::encode($data->getAttributeLabel('id')); ?>:</b>
<?php echo CHtml::link(CHtml::encode($data->id), array('view', 'id'=>$data->id)); ?>
<br />
<b><?php echo CHtml::encode($data->getAttributeLabel('libele')); ?>:</b>
<?php echo CHtml::encode($data->libele); ?>
<br />
<b><?php echo CHtml::encode($data->getAttributeLabel('annee')); ?>:</b>
<?php echo CHtml::encode($data->annee); ?>
<br />
<b><?php echo CHtml::encode($data->getAttributeLabel('quantite')); ?>:</b>
<?php echo CHtml::encode($data->quantite); ?>
<br />
<b><?php echo CHtml::encode($data->getAttributeLabel('modele')); ?>:</b>
<?php echo CHtml::encode($data->modele); ?>
<br />
<b><?php echo CHtml::encode($data->getAttributeLabel('reference')); ?>:</b>
<?php echo CHtml::encode($data->reference); ?>
<br />
<b><?php echo CHtml::encode($data->getAttributeLabel('puissance')); ?>:</b>
<?php echo CHtml::encode($data->puissance); ?>
<br />
<b><?php echo CHtml::encode($data->getAttributeLabel('produit')); ?>:</b>
<?php echo CHtml::encode($data->produit); ?>
<br />
<b><?php echo CHtml::encode($data->getAttributeLabel('type_enveloppe')); ?>:</b>
<?php echo CHtml::encode($data->type_enveloppe); ?>
<br />
<b><?php echo CHtml::encode($data->getAttributeLabel('jauge')); ?>:</b>
<?php echo CHtml::encode($data->jauge); ?>
<br />
<b><?php echo CHtml::encode($data->getAttributeLabel('peh_methalique')); ?>:</b>
<?php echo CHtml::encode($data->peh_methalique); ?>
<br />
<b><?php echo CHtml::encode($data->getAttributeLabel('fabriquant')); ?>:</b>
<?php echo CHtml::encode($data->fabriquant); ?>
<br />
<b><?php echo CHtml::encode($data->getAttributeLabel('type_equipement')); ?>:</b>
<?php echo CHtml::encode($data->type_equipement); ?>
<br />
<b><?php echo CHtml::encode($data->getAttributeLabel('numero_serie')); ?>:</b>
<?php echo CHtml::encode($data->numero_serie); ?>
<br />
<b><?php echo CHtml::encode($data->getAttributeLabel('marque')); ?>:</b>
<?php echo CHtml::encode($data->marque); ?>
<br />
<b><?php echo CHtml::encode($data->getAttributeLabel('capacite')); ?>:</b>
<?php echo CHtml::encode($data->capacite); ?>
<br />
<b><?php echo CHtml::encode($data->getAttributeLabel('num')); ?>:</b>
<?php echo CHtml::encode($data->num); ?>
<br />
<b><?php echo CHtml::encode($data->getAttributeLabel('tbl_station_id')); ?>:</b>
<?php echo CHtml::encode($data->tbl_station_id); ?>
<br />
</td>
<td>
<?php echo CHtml::image(dirname(Yii::app()->getBasePath()).DIRECTORY_SEPARATOR.'images'.DIRECTORY_SEPARATOR.'gallery'.DIRECTORY_SEPARATOR.'java.jpg', 'DORE'); ?>
</td>
</tr>
</table>
</div>
See the preview in error.jpg attached.
Thanks for your help.