En PHP5, le code: session_register("");
CakePHP: comment enregistrer la session?
mon code:
function login() {
// Don't show the error message if no data has been submitted.
$this->set('error', false);
// Production mode. No output. For AJAX
Configure::write('debug', 0);
// Does not render the view
// Others method : $this->render(false, false);
$this->autoRender = false;
// The most important : set : debug = 0 and register session
session_register("");
$this->Session->write('test',"test1");
echo $this->Session->read('test');
}
return ;
}
avez-vous pas un indésirable '}' 'avant le retour, la déclaration'? –
Quelle version de CakePHP utilisez-vous? – Leo