Jump to content
php.lv forumi

Cannot redeclare


xmas12

Recommended Posts

Sveiki, veidoju knelielu login sistēmu... bet atdūros un nelielas problēmas... Tātad : Kods:

 

<?
session_start();
include("config.php");

if ($_SESSION['user']) {
head(); /// Te nolasa headeri
page($_GET['p']); /// Nolasa atvērtās lapas info...
foot(); /// Te nolasa footeri
}else{
?>
<?php

///te logins viss

} 
?>

Bet man uzmet eroru ... :

 

Fatal error: Cannot redeclare head() (previously declared in C:\Program Files\AppServ\www\ptc\data\functions.php:14) in C:\Program Files\AppServ\www\ptc\data\functions.php on line 32

 

Bet 32 rindā vnk nolasa html lapas headeri:

 

<?
function head(){
?>
te viss html headera kods... <head> izvlenes un utt...
<?
}

function foot(){
?>

tee footer kods...

Edited by xmas12
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...