Voilà, une petite erreur surgit à 26 minutes :
( ! ) SCREAM: Error suppression ignored for
( ! ) Parse error: syntax error, unexpected ';', expecting ')' in C:\wamp\www\Tuto\controller\PostsController.php on line 21
Call Stack
1 0.0006 143800 {main}( ) ..\index.php:0
2 0.0040 190952 Dispatcher->__construct( ) ..\index.php:10
3 0.0041 191832 Dispatcher->loadController( ) ..\Dispatcher.php:17
Voici mon postController.php :
<?php
class PostsController extends Controller{
function index(){
$perPage = 1;
$this->loadModel('Post');
$condition = array('online' => 1,'type'=>'post');
$d'posts'] = $this->Post->find(array(
'conditions' => $condition,
'limit' => ($perPage*($this->request->page-1)).','.$perPage
));
$d'total'] = $this->Post->findCount($condition);
$d'page'] = ceil($d'total'] / $perPage);
$this->set($d);
}
function view($id){
$this->loadModel('Post');
$d'page'] = $this->Post->findFirst(array(
'conditions' => array('online' => 1,'id'=>$id,'type'=>'post');
));
if(empty($d'page'])){
$this->e404('Page introuvable');
}
$this->set($d);
}
}
?>
Merci d'avance pour vos futurs réponses.
'conditions' => array('online' => 1,'id'=>$id,'type'=>'post');
sans le point virgule L.21