Skip to content

Instantly share code, notes, and snippets.

@NielsMinssen
Created Aug 11, 2022
Embed
What would you like to do?
<?php
//On stock les données dans la variable dsn (data source name).
$dsn = 'mysql:host=ADRESSE_DU_SERVEUR;dbname=VOTRE_BASE_DE_DONNEES;
port=VOTRE_PORT;charset=VOTRE_ENCODAGE';
//Ensuite il faut se connecter au serveur MySQL en renseignant nos informations.
$pdo = new PDO($dsn, 'VOTRE_NOM_UTILISATEUR_SERVEUR' , 'VOTRE_MOT_DE_PASSE'); ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment