Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [MySQL][PHP]Cannot Redeclare
Marcinekk
post
Post #1





Grupa: Zarejestrowani
Postów: 97
Pomógł: 0
Dołączył: 27.09.2013

Ostrzeżenie: (10%)
X----


Witajcie.

Tworzę system dzięki któremu mogę treść stopki umieścić w bazie danych. Większość już zrobiłem, lecz zamiast treści stopki wyświetla mi się błąd :

  1. Fatal error: Cannot redeclare db_connect() (previously declared in /usr/home/marcin1465/domains/mar-cinek.ct8.pl/public_html/config.php:11) in /usr/home/marcin1465/domains/mar-cinek.ct8.pl/public_html/config.php on line 15


W ogóle nie rozumiem o co mu chodzi, skoro w podfolderze "admin" jest identycznie i poprawnie działa.

Kod tej funkcji :

  1. function db_connect() {
  2.  
  3. mysql_connect(DBHOST, DBUSER, DBPASS) or die('<h2>ERROR</h2> MySQL Server is not responding');
  4.  
  5.  
  6. mysql_select_db(DBNAME) or die('<h2>ERROR</h2> Cannot connect to specified database');
  7. }


Linijka 11 :
  1. mysql_connect(DBHOST, DBUSER, DBPASS) or die('<h2>ERROR</h2> MySQL Server is not responding');

Linijka 15 :
  1. }


Proszę o pomoc, bo po prostu szlag mnie trafia.
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 23.08.2025 - 06:58