Skip to content

Instantly share code, notes, and snippets.

@NielsMinssen
Created August 11, 2022 12:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save NielsMinssen/57cf4fd5d469bb55b364608fb8f9439f to your computer and use it in GitHub Desktop.
Save NielsMinssen/57cf4fd5d469bb55b364608fb8f9439f to your computer and use it in GitHub Desktop.
<?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