如果我使用word鏈接刪除如下需要幫助在cakephp中使用sprintf來刪除數據
<?php
echo $this->Html->link(__('Delete', true), array('action' => 'delete', $company['Company'] ['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $company['Company']['id']));
?>
那麼會有一條確認消息刪除數據。
但是,如果我使用圖標刪除信息,如下所示
<?php
echo $html->link($html->image('delete.png'), $companydeletelink , array('escape' => false, 'title'=>'Delete', sprintf('Are you sure you want to delete # %s?')));
?>
會出現警告,並且消息也沒有提示。
什麼warni你會得到什麼? – dhofstet