class mysql教程{
private $host;
private $name;
private $pass;
function __construct($host,$name,$pass){
$this->host=$host;
$this->name=$name;
$this->pass=$pass;
$this->connect();
}
function connect(){
mysql教程_connect($this->host,$this->name,$this->pass)or die(
mysql_error());
}
}
$db=new mysql('localhost','root','dfd');
//這是一個超簡單的mysql+php教程數據庫教程連接類程序。