<?php include_once('DB.PHP ');?>加上这一句。。
<html>
<head>
<title>PHP的测试 </title>
</head><body>
<?php
$db=new db();
$result=$db->getQuery();
while($rs=mysql_fetch_object($result)){
echo "username: ".$rs->U_NAME." Password: ".$rs->U_PASSWORD." <P>"." <a href=/mysqlphp/delete.php?id=".$rs->ID.">删除 </a>"." <a href=/mysqlphp/update.php?id=".$rs->ID."&name=".$rs->U_NAME."& amp;pw=".$rs->U_PASSWORD.">修改 </a>";
}
?>
</body>
</html>
<html>
<head>
<title>PHP的测试 </title>
</head><body>
<?php
$db=new db();
$result=$db->getQuery();
while($rs=mysql_fetch_object($result)){
echo "username: ".$rs->U_NAME." Password: ".$rs->U_PASSWORD." <P>"." <a href=/mysqlphp/delete.php?id=".$rs->ID.">删除 </a>"." <a href=/mysqlphp/update.php?id=".$rs->ID."&name=".$rs->U_NAME."& amp;pw=".$rs->U_PASSWORD.">修改 </a>";
}
?>
</body>
</html>
import xxx.xxx.xxx;
php一样,你想实例化类,也得引入类的文件.
includ_once('DB.php');