Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP][MYSQL] mysqli problem.
Beosky
post
Post #1





Grupa: Zarejestrowani
Postów: 62
Pomógł: 0
Dołączył: 13.02.2012
Skąd: Wrocław

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


Witam!
Otóz mam problem, a mianowicie.
Cytat
Fatal error: Class 'mysqli' not found in D:\Program Files\WebServ\httpd\functions\funkcje.php on line 28


Linijka 28
  1. function lacz_bd() { $wynik = new mysqli('localhost', 'root', 'haslo', 'portal');
  2. if (!$wynik) { throw new Exception('Połączenie z serwerem bazy danych nie powiodło się.'); }
  3. else {
  4. return $wynik;
  5. }
  6. }


Klasa mysqli nie istnieje w linijce 28.., a jest..
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
Beosky
post
Post #2





Grupa: Zarejestrowani
Postów: 62
Pomógł: 0
Dołączył: 13.02.2012
Skąd: Wrocław

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


Fail. Miałem wyłączoną php_mysqli bibliotekę, ale teraz mam inny problem.

Cytat
Fatal error: Uncaught exception 'Exception' with message 'Rejestracja nie powiodła się.' in D:\Program Files\WebServ\httpd\functions\funkcje.php:36 Stack trace: #0 D:\Program Files\WebServ\httpd\register.php(9): require_once() #1 {main} thrown in D:\Program Files\WebServ\httpd\functions\funkcje.php on line 36


A tutaj kod
  1. $wynik = lacz_bd()->query("insert into users values ('$login', shal('$haslo'), '$email'");
  2. if (!$wynik) { throw new Exception('Rejestracja nie powiodła się.');
  3. }
  4. return true;
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: 22.08.2025 - 19:47