il y a ce message que je rencontre souvent
Code : Tout sélectionner
Warning: session_start(): Cannot send session cookie - headers already sent by Code : Tout sélectionner
Warning: session_start(): Cannot send session cookie - headers already sent by
<?php
session_start();
?>
<html>
<head>
<?php
//
?>
</head>
<body>
//
</body>
</html>
ce code session_start serai appliquer a tous, je vais le faire dans mon index.php
"tous" koi ???? toutes les pages php?ce code session_start serai appliquer a tous
<?php
session_start();
?>
<html>
<head>
<?php
include ("include_files/headers.php");
include ("include_files/HowManyCarachtersLeft.php");
?>
</head>
<body topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">
<table align="center" width="85%" border="0" cellspacing="0" cellpadding="2">
<tr>
<td>
<?php
include ("include_files/menu.php");
?>
</td>
</tr>
<tr>
<td>
<?php
include ("body.php");
?>
</td>
</tr>
<tr>
<td>
<?php
include ("include_files/footers.php");
?>
</td>
</tr>
</table>
</body>
</html>
$cookie_name = "auth";
$cookie_value = "success";
$cookie_expire = time()+86400;
$cookie_domain = "127.0.0.1";
setcookie($cookie_name, $cookie_value, $cookie_expire, "/" , $cookie_domain, 0);
mais ca me donne l'erreur aussi de headers ...