Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在寻找一种在 CForm formbuilder 数组中显示图像的简单方法。但我想显示模型内容,比如这个例子:
array( 'elements'=>array( '<img src="$this->thumbnail" />', 'thumbnail'=>array( 'type'=>'file', ), ), )
那可能吗?
找到了,这行得通。
return array( 'elements'=>array( '<img src="'.$this->getModel()->thumbnail.'" alt="" />', 'thumbnail'=>array( 'type'=>'file', ), ), );