I get this error the first time I try CakePHP:
Undefined variable: html [APP / View / Posts / index.ctp, line 13]
I have version 2.0-alpha, I have the wrong version or what has changed again. It seems he cannot find the html helper.
Additional information on request:
Here is the index.ctp file
<?php foreach ($posts as $post): ?> <?php echo $post['Post']['id']; ?> <?php <?php echo $post['Post']['created']; ?> <?php endforeach; ?>
The data certainly passes, but the error I get is on line 13:
Undefined variable: html [APP / View / Posts / index.ctp, line 13] Fatal error: call of member function-function () for non-object in / home
I am brand new, hope this helps.
Update 5 hours after craziness
Thank you guys, he figured out that someone has this problem, the textbook on the main site is old, and no one made an effort to update it! ... in the index.ctp example, replace
$html->link(...
from
$this->Html->link(...
source share