jeudi 21 janvier 2016

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers i solve plzz guys

Required from the code that if there was no session It is transferred to the Welcome page But the code does not work and prints me this letter

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at C:\AppServ\www\Weboo\secret\index.php:1) in C:\AppServ\www\Weboo\secret\index.php on line 3

<?php
ob_start();
session_start();

if (!isset($_SESSION['username'])){
    header("Location: welcome.php");
}

?>




Aucun commentaire:

Enregistrer un commentaire