Code Php Probleme

aureliendu917 Messages postés 267 Date d'inscription   Statut Membre Dernière intervention   -  
Nabla's Messages postés 18201 Date d'inscription   Statut Contributeur Dernière intervention   -
Bonjour,
voila j'ai un probleme avec se code :

<?php
define('IN_PHPBB', true);
$phpbb_root_path =  'forum/';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);
$user->session_begin();
$auth->acl($user->data);
$user->setup('');
?>
TEXTE
<?php
if (isset($_GET['logout']))
{
   $user->session_kill();
   $user->session_begin();
}
if (isset($_POST['login']))
{
   $username = request_var('username', '', true);
   $password    = request_var('password', '', true);
   $autologin   = (!empty($_POST['autologin'])) ? true : false;
   $viewonline = (!empty($_POST['viewonline'])) ? 0 : 1;
   $admin = 0;
   $result = $auth->login($username, $password, $autologin, $viewonline, $admin);
   if ($result['status'] != LOGIN_SUCCESS)
   {
      $err = $user->lang[$result['error_msg']];
      if ($result['error_msg'] == 'LOGIN_ERROR_USERNAME' || $result['error_msg'] == 'LOGIN_ERROR_PASSWORD')
      {
         $err = (!$config['board_contact']) ? sprintf($user->lang[$result['error_msg']], '', '') : sprintf($user->lang[$result['error_msg']], '<a href="mailto:' . htmlspecialchars($config['board_contact']) . '">', '</a>');
      }
   }
   else
   {
      $auth->acl($user->data);
   }
}
if ($user->data['user_id'] != ANONYMOUS)
{
if($user->data['user_avatar'] != "http://" && $user->data['user_avatar'] != "")
{
   echo '<table border="0" cellpadding="0" cellspacing="0">
<tr>
   <td background="http://simsado.free.fr/img/avatar/gauche.png" width="11" height="11" style="background-repeat:no repeat;"></td>
   <td background="http://simsado.free.fr/img/avatar/bordurehaut.png"></td>
   <td background="http://simsado.free.fr/img/avatar/droit.png" width="11" height="11" style="background-repeat:no repeat;"></td>
</tr>
<tr>
   <td background="http://simsado.free.fr/img/avatar/borduregauche.png"></td>
   <td><img src="forum/download/file.php?avatar=' . $user->data['user_avatar'] . '" border="0" alt=""></td>
   <td background="http://simsado.free.fr/img/avatar/borduredroit.png"></td>

</tr>
<tr>
   <td background="http://simsado.free.fr/img/avatar/basgauche.png" width="11" height="11" style="background-repeat:no repeat;"></td>
   <td background="http://simsado.free.fr/img/avatar/bordurebas.png"></td>
   <td background="http://simsado.free.fr/img/avatar/basdroit.png" width="11" height="11" style="background-repeat:no repeat;"></td>
</tr>

</table>';
}
   echo '<a href="' . append_sid('index.php?logout=true') . '">Déconnexion</a>';
}
else
{
if($err)
   {
      echo "<font color=red><b>$err</b></font>";
   }
?>
<form method="post">
   <table>
      <tr>
         <td align="right">Pseudo:</td>
         <td><input type="text" tabindex="1" name="username" size="25" /></td>
      </tr>
      <tr>
         <td align="right">Mot de passe:</td>
         <td><input type="password" tabindex="2" name="password" size="25" />
         <br /><a href="<?php echo append_sid("{$phpbb_root_path}ucp.$phpEx?mode=sendpassword"); ?>">J’ai oublié mon mot de passe</a>
         </td>
      </tr>
      <tr>
      
      </tr>
      <tr>
         <td>&nbsp;</td>
         <td><input type="checkbox" name="autologin" tabindex="3" /> Me connecter automatiquement à chaque visite</td>
      </tr>
      <tr>
         <td>&nbsp;</td>
         <td><input type="checkbox" name="viewonline" tabindex="4" /> Cacher mon statut en ligne pour cette session</td>
      </tr>
      <tr>
         <td colspan="2" align="center"><input type="submit" name="login" tabindex="5" value="Connexion" /></td>
      </tr>
   </table>
</form>
<?php
}
?>


Sai m'affiche ça :

TEXTE [phpBB Debug] PHP Notice: in file /includes/session.php on line 990: Cannot modify header information - headers already sent by (output started at G:/test/index.php:11)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 990: Cannot modify header information - headers already sent by (output started at G:/test/index.php:11)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 990: Cannot modify header information - headers already sent by (output started at G:/test/index.php:11)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 990: Cannot modify header information - headers already sent by (output started at G:/test/index.php:11)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 990: Cannot modify header information - headers already sent by (output started at G:/test/index.php:11)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 990: Cannot modify header information - headers already sent by (output started at G:/test/index.php:11)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 990: Cannot modify header information - headers already sent by (output started at G:/test/index.php:11)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 990: Cannot modify header information - headers already sent by (output started at G:/test/index.php:11)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 990: Cannot modify header information - headers already sent by (output started at G:/test/index.php:11)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 990: Cannot modify header information - headers already sent by (output started at G:/test/index.php:11)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 990: Cannot modify header information - headers already sent by (output started at G:/test/index.php:11)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 990: Cannot modify header information - headers already sent by (output started at G:/test/index.php:11)

AVATAR ICI ...

Déconnexion.

Est ce que quelq'un peut m'aidez svp
Configuration: Windows Vista Internet Explorer 7.0

2 réponses

  1. Nabla's Messages postés 18201 Date d'inscription   Statut Contributeur Dernière intervention   3 228
     
    comme le message d'erreur le dit, tu essayes d'envoyer des header (ou un coockie, ou un début de session) alors que tu as deja envoyé du texte (la ou tu as marqué TEXTE, a la ligne 11...

    et si tu as deja envoyé du texte, tu n'as plus el droit d'envoyuer des trucs dans l'entete http
    0
  2. Nabla's Messages postés 18201 Date d'inscription   Statut Contributeur Dernière intervention   3 228
     
    le probleme doit venir de ce bout de code:
    if (isset($_GET['logout']))
    {
    $user->session_kill();
    $user->session_begin();
    }
    qui doit etre placé avant le TEXTE
    0