我正在使用cakePHP 2.3.0.我在手册中搜索了很长一段时间,但我还没有找到答案.我正在尝试使用$this->
@L_403_0@->链接,以及$this-> Html->图片.我正在尝试创建单击图像的功能.有关为什么生成引号的ascii渲染的任何想法?
echo $this->html->tableCells( array( array( array ( $this->Html->link($myActivity['Activity']['name'],array('controller' => 'users','action' => 'edit'),array('title' => '')),array('align' => 'left')),array ($myActivity['Activity']['status'],array ($myActivity['Activity']['any_messages'],$date2,array ($this->Html->link( $this->Html->image('pencil.jpg',array('alt' => 'Edit','border' => '0','width' => '25')),'action' => 'add'),array('title' => '')) ),$this->Html->image('trashcan.jpg',array('alt' => 'Delete',$this->Html->image('copy.png',array('alt' => 'Copy',) ) );
下面是上面代码的实际HTML结果.如您所见,生成的HTML显示引号(“)和”<“的ascii版本和'>‘:
<tr> <td align="left"> <a href="/activities/index.PHP/users/add" title="">Running</a> </td> <td align="left">Live</td> <td align="left">no</td> <td>02/18/13</td> <td> <a href="/activities/index.PHP/users/edit" title=""><img src="/activities/app/webroot/img/pencil.jpg" alt="Edit" border="0" width="25" /></a> </td> <td> <img src="/activities/app/webroot/img/trashcan.jpg" alt="Delete" border="0" width="25"> </td> </tr>
以下是我希望HTML看起来像:
<tr> <td align="left"> <a href="/activities/index.PHP/users/add" title="">Running</a> </td> <td align="left">Live</td> <td align="left">no</td> <td>02/18/13</td> <td> <a href="/activities/index.PHP/users/edit" title=""> <img src="/activities/app/webroot/img/pencil.jpg" alt="Edit" border="0" width="25"></a> </td> <td> <img src="/activities/app/webroot/img/trashcan.jpg" alt="Delete" border="0" width="25"> </td> </tr>