php - COOKIES headers already sent -
this question has answer here:
- how fix “headers sent” error in php 11 answers
i have probelm cookie.
error:
cannot modify header information - headers sent (output started @ /data/web/virtuals/9784/virtual/www/subdom/roids/_libs/_lib.php:1) in /data/web/virtuals/9784/virtual/www/subdom/roids/_libs/_lib.php on line 43
index:
<?php session_start(); error_reporting(e_all); require_once('_libs/_console.php'); require_once('_libs/class.phpmailer.php'); require_once('_libs/_lib.php'); //require_once('_libs/passwordlib.phar'); $db = new database(); $func = new functions($db); $cms = new cms_system($func, $db); $func->setlang();
the file _lib.php starts <?php
, there no whitespace @ start. file contains classes , functions.
function setlang:
public function setlang() { setcookie("lang", "sk", time()+60*60*24*30); if (isset($_post['lang'])) { setcookie("lang", $_post['lang'], time()+60*60*24*30); } }
i tried deleting session_start script not work. comments or solutions
remove echo if @ _lib.php file..and try..
Comments
Post a Comment