开发者

how to pass image size if using html::image()

开发者 https://www.devze.com 2023-03-27 21:20 出处:网络
how can i specify height and width of an image if i use html::image() in koahana 3. if i pass all attributes in an array it saysthat string expected instead of array ......please help

how can i specify height and width of an image if i use html::image() in koahana 3. if i pass all attributes in an array it says that string expected instead of array ......please help

echo "<td class='".$class."' align='left' style='border-left:1px solid #D3D3D3'>
<a c开发者_高级运维lass='list_title' href='".$editBannerHref."'>".            
html::image(array("src"=>"media/uploads/video_portal thumbnail".$videos[$count]->image,"alt"=>"","width"=>60,"height"=>50))."</a><br/>
<a href='".$playVideo."'>View Video</a></td>";


First parameter is file name, second attributes - http://kohanaframework.org/3.2/guide/api/HTML#image This is the correct usage:

HTML::image("media/uploads/video_portal thumbnail".$videos[$count]->image, array("alt"=>"", "width"=>60, "height"=>50))
0

精彩评论

暂无评论...
验证码 换一张
取 消