docker-compose 模板
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

20 lines
316 B

<?php
/*
try{
$con =new PDO("mysql:host=mysql;dbname=test","root","123456");
echo"ok...";
}catch(PDOException $e){
echo $e->getMessage();
}
*/
$con = new mysqli("mysql","root","123456");
if($con->connect_error){
die("connect fail".$con->connect_error);
}else{
echo "connect success!";
}