-
-
Save codeforfun-jp/30942db8abef6beec7b7baa48fb7b98b to your computer and use it in GitHub Desktop.
Save Image File with PHP & MySQL - #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// データベースに接続 | |
function connectDB() { | |
$param = 'mysql:dbname=my_image;host=localhost'; | |
try { | |
$pdo = new PDO($param, 'root', 'root'); | |
return $pdo; | |
} catch (PDOException $e) { | |
exit($e->getMessage()); | |
} | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment