Bonjour,
J'essaye de faire une redirection vers une adresse dans mon
contrôleur :
Code du contrôleur :
-----------------------------
function add() {
$modelClass = $this->modelClass;
if (!empty($this->data)) {
$this->$modelClass->create();
$this->data['Plan']['description'] = $this->html2text($this-
>data['Plan']['description']);
$this->$modelClass->save($this->data["Plan"]);
$this->redirect('/'.$this->viewPath.'/index');
}
}
1) L'exécution de ce code en local sur mon PC avec EasyPhp 2.0
fonctionne correctement
2) L'exécution de ce code sur un serveur Unix avec "PHP Version 5.2.5,
System HP-UX frl4 B.11.11 U 9000/800"
génère l'erreur suivante :
Warning (2): Cannot modify header information - headers already sent
by (output started at /opt/hpws/apache/htdocs/cake/app/
app_controller.php:75) [CORE/cake/libs/controller/controller.php, line
546]
header - [internal], line ??
Controller::redirect() - CORE/cake/libs/controller/controller.php,
line 546
PlansController::add() - APP/controllers/plans_controller.php, line
165
Dispatcher::_invoke() - CORE/cake/dispatcher.php, line 268
Dispatcher::dispatch() - CORE/cake/dispatcher.php, line 240
[main] - APP/webroot/index.php, line 84
Je n'arrive pas vraiment à comprendre pourquoi j'ai cette erreur,
quelqu'un peut-il m'aider sur ce sujet ?
Merci d'avance
Frédéric
--~--~---------~--~----~------------~-------~--~----~
Groupe "Cakephp-fr".
Adresse : [email protected]
Pour résilier : [EMAIL PROTECTED]
Pour les options : http://groups.google.com/group/cakephp-fr?hl=fr
-~----------~----~----~----~------~----~------~--~---