php?ж????????????????????????
???????????? ???????[ 2015/9/9 14:22:43 ] ????????php ???????????
???????????????????ò???????????php??mysql?????y???
????win7???????????php-Apache-mysql???? http://www.cnblogs.com/myall/p/4744837.html
<form action="" method="post">
<select name="host">
<option value="localhost" selected>localhost</option>
<option value="127.0.0.1">127.0.0.1</option>
</select>
<br><br>
user:<input type="text" name="user" value=""><br><br>
pwd :<input type="password" name="pwd" value=""><br><br>
<input type="submit" value="connent">
<input type="reset" value="reset">
</form>
<?php
error_reporting(~E_ALL);
$host = $_POST['host'];
$user = $_POST['user'];
$pwd = $_POST['pwd'];
if(isset($_POST['host']) && isset($_POST['user']) && isset($_POST['pwd'])){
if(strlen($host)<1 or strlen($user)<1 or strlen($pwd)<1){
echo "???????????????????????";
exit(0);
}
$conn = mysql_connect($host?? $user?? $pwd) or die("Error-?????????????");
if($conn){
echo "OK—?????????????";
}
}
?>
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11