Probleme de redirection Php

Petit nouveau ! | 1 Messages

28 août 2012, 02:01

Bonjour alors voila j'ai un probleme de redirection a la déconnection de mon compte.

Code : Tout sélectionner

Warning: Cannot modify header information - headers already sent by (output started at /home/equinoxs/public_html/site/include/haut.php:50) in /home/equinoxs/public_html/site/class/user.class.php on line 133 Warning: Cannot modify header information - headers already sent by (output started at /home/equinoxs/public_html/site/include/haut.php:50) in /home/equinoxs/public_html/site/class/user.class.php on line 134 Warning: Cannot modify header information - headers already sent by (output started at /home/equinoxs/public_html/site/include/haut.php:50) in /home/equinoxs/public_html/site/class/user.class.php on line 135 Warning: Cannot modify header information - headers already sent by (output started at /home/equinoxs/public_html/site/include/haut.php:50) in /home/equinoxs/public_html/site/class/user.class.php on line 144
Voila ma commande dans ma page user.class.php
// Fonction de redirection
	public static function Redirect($url, $temp=0)
	{
		if($temp == 0)
			header('Location: '.$url);
		else
			header('Refresh: '.$temp.'; URL='.$url);

Merci de m'aidé :)

Vous pouvez me contacté par skype plus rapidement sur ce nom : xxskyste

ViPHP
xTG
ViPHP | 7331 Messages

28 août 2012, 06:47

Tu as déjà envoyé du contenu au navigateur avant le header.
A priori vu le nom du fichier pointé du html. ;-)

Eléphant du PHP | 229 Messages

28 août 2012, 08:08

Bonjour,
Pour info :
un espace = du contenu.
Bon codage.