Eroare headers already sent la logare magazin online
Scris: Vin Sep 07, 2012
Am si eu o problema daca este cineva care ma poate ajuta.
Am un magazin online si la logare dupa ce introduc user si parola si apas butonul login ramane ecranul alb, cand sterg un produs din cos sau cand dau recuperare parola primesc aceasta eroare:
Am copiat fisierele respective si le pun aici ca nu stiu ce sa le fac:
Si celalat:
Multumesc anticipat.
Am un magazin online si la logare dupa ce introduc user si parola si apas butonul login ramane ecranul alb, cand sterg un produs din cos sau cand dau recuperare parola primesc aceasta eroare:
Cod: Selectaţi tot
2012-09-07 15:48:29 - PHP Warning: Cannot modify header information - headers already sent by (output started at /home/arinna/public_html/catalog/language/romana/account/login.php:1) in /home/arinna/public_html/system/engine/controller.php on line 28
2012-09-07 15:48:29 - PHP Warning: Cannot modify header information - headers already sent by (output started at /home/arinna/public_html/catalog/language/romana/account/login.php:1) in /home/arinna/public_html/system/engine/controller.php on line 29
Cod: Selectaţi tot
<?php
abstract class Controller {
protected $registry;
protected $id;
protected $layout;
protected $template;
protected $children = array();
protected $data = array();
protected $output;
public function __construct($registry) {
$this->registry = $registry;
}
public function __get($key) {
return $this->registry->get($key);
}
public function __set($key, $value) {
$this->registry->set($key, $value);
}
protected function forward($route, $args = array()) {
return new Action($route, $args);
}
protected function redirect($url, $status = 302) {
header('Status: ' . $status);
header('Location: ' . str_replace(array('&', "\n", "\r"), array('&', '', ''), $url));
exit();
}
protected function getChild($child, $args = array()) {
$action = new Action($child, $args);
if (file_exists($action->getFile())) {
require_once($action->getFile());
$class = $action->getClass();
$controller = new $class($this->registry);
$controller->{$action->getMethod()}($action->getArgs());
return $controller->output;
} else {
trigger_error('Error: Could not load controller ' . $child . '!');
exit();
}
}
protected function render() {
foreach ($this->children as $child) {
$this->data[basename($child)] = $this->getChild($child);
}
if (file_exists(DIR_TEMPLATE . $this->template)) {
extract($this->data);
ob_start();
require(DIR_TEMPLATE . $this->template);
$this->output = ob_get_contents();
ob_end_clean();
return $this->output;
} else {
trigger_error('Error: Could not load template ' . DIR_TEMPLATE . $this->template . '!');
exit();
}
}
}
?>
Cod: Selectaţi tot
<?php
// Heading
$_['heading_title'] = 'Autentificare';
// Text
$_['text_account'] = 'Cont';
$_['text_login'] = 'Autentificare';
$_['text_new_customer'] = 'Client Nou';
$_['text_register'] = 'Inregistrează Cont';
$_['text_register_account'] = 'Prin crearea unui cont vei putea face cumpărături mai rapid, vei fi pus la curent cu comenzile, si vei tine evidenţa comenziilor efectuate de tine. In plus beneficiezi de puncte de fidelitate';
$_['text_returning_customer'] = 'Client existent';
$_['text_i_am_returning_customer'] = 'Am cont deja';
$_['text_forgotten'] = 'Parola Uitata';
// Entry
$_['entry_email'] = 'Adresa E-Mail:';
$_['entry_password'] = 'Parola:';
// Error
$_['error_login'] = 'Eroare: Nici o potrivire pentru e-mail si/sau Parola.';
?>