Skip to content

Instantly share code, notes, and snippets.


codeforfun-jp/functions.php Secret

Created Apr 21, 2021
What would you like to do?
Save Image File with PHP & MySQL - #2
// データベースに接続
function connectDB() {
$param = 'mysql:dbname=my_image;host=localhost';
try {
$pdo = new PDO($param, 'root', 'root');
return $pdo;
} catch (PDOException $e) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment