Coding Global Background
Coding Global

Man kann nicht mit andereen benutzern db oder tabbles ein verbindung (mysql) eingehen

Archiviert 2 years ago
2 Nachrichten
0 Mitglieder
Erstellt 2 years ago
Aktualisiert 2 years ago
In Discord öffnen
X
Xabropos
conn:
<?php
error_reporting(E_ALL);
ini_set('display_errors','On');
session_start();

try{
$pdo = new PDO('mysql:host=localhost;dbname=LiveChat','LiveChat','');
$pdo->setAttribute(PDO::ATTR_ERRMODE,PDO::ERRMODE_EXCEPTION);
return $pdo;
}catch (Exception $e){

header('Content-Type:application/json;charset=utf-8');

http_response_code(500);
$output = ['status'=>'failed','message' => $e->getMessage()];
echo json_encode($output);
exit();
}
$pdo = createPdoConnection();

Antworten (2)