Skip to content

Instantly share code, notes, and snippets.

@fumilab
Last active March 19, 2018 01:10
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 fumilab/25dbcf8924d0f22eddf8717708f86e4f to your computer and use it in GitHub Desktop.
Save fumilab/25dbcf8924d0f22eddf8717708f86e4f to your computer and use it in GitHub Desktop.
PHP、データベースに接続する。
<php?
//データベースに接続する
$dsn='mysql:dbname=phpkiso;host=localhost;charset=utf8';
$user='root';
$password='root';
$dbh=new PDO($dsn, $user, $password);
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment