Connection impossible par $bdd = new PDO
Résolu
zgsir
Messages postés
1
Date d'inscription
Statut
Membre
Dernière intervention
-
zgsir -
zgsir -
A voir également:
- Connection impossible par $bdd = new PDO
- New outlook - Accueil - Mail
- New cpu installed ftpm/psp nv corrupted or ftpm/psp nv structure changed - Forum BIOS
- Indicatif new york whatsapp - Forum Opérateurs & Réseaux mobiles
- New york 911 télécharger - Forum Cinéma / Télé
- Climatiseur new carrye - Forum Matériel & Système
2 réponses
Salut à toi
essaye plutôt ceci pour ta connexion
Cordialement.
essaye plutôt ceci pour ta connexion
<?php try { $dns = 'mysql:host=localhost;dbname=sc_z'; $utilisateur = 'root'; $motDePasse = 'ton mdp'; $bdd = new PDO( $dns, $utilisateur, $motDePasse, array (PDO::MYSQL_ATTR_INIT_COMMAND=>'SET NAMES utf8',PDO::ATTR_ERRMODE=>PDO::ERRMODE_EXCEPTION)); } catch (Exception $e) { echo 'Erreur : ' . $e->getMessage(); } ?>
Cordialement.