BANSYSTEMSBLOG

Load of the ○○○○PHP!?

cakePHP1.3からは引数の指定が変わっていました。

cakePHP1.2では、


<?php
echo $html->link(
    $html->image("recipes/6.jpg", array("alt" => "Brownies")),
    "recipes/view/6",
    null, null, false
);
?>

cakePHP1.3では、

<?php
echo $html->link(
    $html->image("recipes/6.jpg", array("alt" => "Brownies")),
    "recipes/view/6",
    array('escape'=>false)
);
?>

$html->linkでも動きますが、1.3からの書き方は$this->Html->linkになっています。