Cookies werden nicht gesetzt - Hilfe!

  • Gten Abend Com.


    Ich bin neu in Coding, wie kann ich diesen Fehler beheben ?


    Fehler:


    PHP
    Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/www/web73/html/cp/libs/config/config.class.php:1) in /home/www/web73/html/cp/index.php on line 3
    
    
    Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/www/web73/html/cp/libs/config/config.class.php:1) in /home/www/web73/html/cp/index.php on line 3
  • Bitte den Quellcode von deiner Index.php oder der PHP-File beilegen wo die Klasse benutzt wird.



    index.php:


    PHP
    <?phprequire_once("libs/framework.class.php");	session_start();$framework = new UCP_Framework();?>


    framework.class.php:


    PHP
    <?phprequire_once("libs/config/config.class.php");require_once("libs/data/language.class.php");require_once("libs/data/mysql.class.php");require_once("libs/Smarty.class.php");class UCP_Framework {	protected static $mysqlObj;    protected static $configObj;    protected static $langObj;	protected static $tplObj;	protected static $pageObj;	protected static $requestedPage = '';	public function __construct() {        $this->initConfig();         $this->initDB();        $this->initLang();		$this->initTpl();		$this->readRequest();		$this->handlePage();	}	protected function readRequest() {		if( isset($_GET["page"]) ) {			self::$requestedPage = $_GET["page"];		} else {			self::$requestedPage = 'Home';		}	}	protected function handlePage() {		if( file_exists ( "libs/pages/".self::$requestedPage."Page.class.php" ) ) {			require_once("libs/pages/".self::$requestedPage."Page.class.php");			self::getTPL()->assign("PAGE", self::$requestedPage);			$pageObjekt = self::$requestedPage."Page";			self::$pageObj = new $pageObjekt();		} else {			header("Location: index.php?page=Home");		}	}    protected function initConfig() {        self::$configObj = new Config();       }	 public static final function getConfig() {         return self::$configObj;	 }     protected function initDB() {         self::$mysqlObj = new mysql( self::getConfig()->server,    			 self::getConfig()->benutzer,			 self::getConfig()->passwort,			 self::getConfig()->datenbank );     }     public static final function getDB() {         return self::$mysqlObj;        }     protected function initLang() {         self::$langObj = new Language(1);        }     public static final function getLang() {         return self::$langObj;        }	 protected function initTpl() {		self::$tplObj = new Smarty;	 }	 public static final function getTPL() {		return self::$tplObj;	 }}?>

  • Beitrag von DMW007 ()

    Dieser Beitrag wurde gelöscht, Informationen über den Löschvorgang sind nicht verfügbar.
  • do.de - Domain-Offensive - Domains für alle und zu super Preisen