我想通过使用此函数在CodeIgniter中的表单(100 * 100)上显示图像时调整图像大小:
echo img('imagepath');
答案 0 :(得分:1)
这样做..
$image_properties = array(
'src' => 'imagepath',
'alt' => 'Me, demonstrating how to eat 4 slices of pizza at one time',
'class' => 'post_images',
'width' => '100',
'height' => '100',
'title' => 'That was quite a night'
);
echo img($image_properties);
来源: Codeigniter