xmas12 Posted December 24, 2010 Report Share Posted December 24, 2010 (edited) 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 December 24, 2010 by xmas12 Link to comment Share on other sites More sharing options...
Rincewind Posted December 24, 2010 Report Share Posted December 24, 2010 (edited) Tev vai nu ir divas funkcijas ar nosaukumu head() vai kaut kur citur kodā ar include vēlreiz izsauc functions.php Edited December 24, 2010 by Rincewind Link to comment Share on other sites More sharing options...
Aleksejs Posted December 24, 2010 Report Share Posted December 24, 2010 un kas ir faila C:\Program Files\AppServ\www\ptc\data\functions.php 14. rindiņā? Link to comment Share on other sites More sharing options...
xmas12 Posted December 24, 2010 Author Report Share Posted December 24, 2010 un kas ir faila C:\Program Files\AppServ\www\ptc\data\functions.php 14. rindiņā? <div id="header"> Link to comment Share on other sites More sharing options...
sandis_m Posted December 24, 2010 Report Share Posted December 24, 2010 (edited) Zin, atradis īsto laiku, kad cept augšā tēmu par kaut kādām login sistēmām. Ir taču Ziemassvētki :) neskopojies un parādi visu kodu ar visām f-cijām Edited December 24, 2010 by who_i_am Link to comment Share on other sites More sharing options...
Morphius Posted December 24, 2010 Report Share Posted December 24, 2010 Kur Tev tiek piesaistīts fails functions.php? Tev config failā atrodas gan uzstādījumi, gan funkcijas? Vai function.php tiek piesaistīts tajā config failā? Link to comment Share on other sites More sharing options...
xmas12 Posted December 24, 2010 Author Report Share Posted December 24, 2010 Kur Tev tiek piesaistīts fails functions.php? Tev config failā atrodas gan uzstādījumi, gan funkcijas? Vai function.php tiek piesaistīts tajā config failā? Jā config.php failā man ir : include("data/function.php"); Link to comment Share on other sites More sharing options...
xmas12 Posted December 24, 2010 Author Report Share Posted December 24, 2010 Viss tika salabots. Varat slēgt ciet. Vienkārši nevajadzēja includot to function.php failu ieks config.php failā. Link to comment Share on other sites More sharing options...
Recommended Posts