這個同學錄原來給我們班級用的,因為服務器沒有mysql支持,就選擇了dbm 國內還沒有什麼dbm程序,國外也幾乎沒有花了一個晚上,在幾乎沒有任何參考的情況下寫了出來現在公佈出來是一個非常好的dbm使用範例1、index.php3 if($login){ ?> 深圳中學2000屆高中(12)班同學錄 <br>A {text-decoration: none; color: #336699; font-family: "宋體"; font-size: 9pt} <br>A:hover {text-decoration: underline; color: #FF0000; font-family : "宋體"; font-size: 9pt} <br>body {font-family: "宋體", "serif"; font-size: 9pt} <br>td {font-family: "宋體", "serif" ; font-size: 9pt} <br>input {font-size: 9pt} <br>p {font-size: 9pt} <br>br {font-size: 9pt} <br>tr {font-size: 9pt-size: 9pt } <br>table {font-size: 9pt} <br>INPUT { FONT-FAMILY: arial,宋體; FONT-SIZE: 9pt; PADDING-TOP: 3px } <>INPUT.text { <POL. : #f0f0f0; BORDER-BOTTOM: #101010 1px solid; BORDER-LEFT: #101010 1px solid; BORDER-RIGHT: #101010 1px solid; BORDER-TOP: #101010 1010 1px solid; BORDER-TOP: #101010 107p> >INPUT.file { <br> BACKGROUND-COLOR: #f0f0f0; BORDER-BOTTOM: #101010 1px solid; BORDER-LEFT: #101010 1px solid; BORDER-RORDER-LEFT: #101010 1pxsolid; solid ; COLOR: #000000 <br>} <br>SELECT { <br> BACKGROUND-COLOR: #f0f0f0; BORDER-BOTTOM: #101010 1px solid; BORDER-LEDER-BOTTOM: #101010 1px solid; x solid ; BORDER-TOP: #101010 1px solid; COLOR: #000000 <br>} <br>TEXTAREA { <br> BACKGROUND-COLOR: #f0f0f0; BORDER-1 x solid ; BORDER-RIGHT: #101010 1px solid; BORDER-TOP: #101010 1px solid; COLOR: #000000 <br>} <br>.stedit { font-size: 9pt; > border-right: 1px solid #4a3163; border-top: 1px solid #4a3163; <br> border-bottom: 1px solid #000066 } <br>.stbb { 1px : #cococolor; -size: 9pt; height: 20px; <br> border-left: 1px solid #ffffff; border-right: 1px solid #665b8e; <br>order-top: 1ffpx solid #ffffpx } <br>.ddd {COLOR: #ffffff; FILTER: glow(color=black,strength=1); FONT-SIZE: 9pt; LINE-HEIGHT: 13pt; POSITION: relative; WIDTH: 100%} <br>< /style> <br><br> <br><body bgcolor="#FFFFFF"> <br><p class=pt10 align=center><b>深圳中學2000屆高中(12)班同學錄<br> <br><table border="0" width="80%" cellpadding="2" cellspacing="1" bgcolor="#000000" align="center"> <br> < tr align=center> <br> <td width=19% bgcolor="#336699"><font color="#FFFFFF">姓名 <br> "#336699"><font color="#FFFFFF">NickName <br> <td width=18% bgcolor="#336699"><font color="#FFFFFF">OICQ< /FONT> <br> <td width=27% bgcolor="#336699"><font color="#FFFFFF">郵件地址 <br> <td width=19 % bgcolor="#336699"><font color="#FFFFFF">詳細資料 <br> <br><? <br>$dbm=dbmopen("class" ,"r"); <br>$key = dbmfirstkey($dbm); <br>while ($key) { <br> $data=dbmfetch($dbm, $key); <br> $data=dbmfetch($dbm, $key); <br> $data=dbmfetch($dbm, $key); <br> $data= info "|!:!|",$data); <br> echo "<tr BGCOLOR="#FFF5E1" align="center"><td width=19%><a href=show.php3?id=$key >$info[0]<td width=17%>$info[1]<td width=18%>$info[4]<td width= 27%>$info[2]<td width=19%><a href="show.php3?id=$key">點擊看"; <br> $key = dbmnextkey($dbm, $key); <br>}<br>?> <br> <tr BGCOLOR="#336699" align="center"> <br> <td colspan="5"><font color=#FFFFFF><a href="modify.php3"> <font color=#FFFFFF>修改資料||<a href="changepwd.php3"><font color=#FFFFFF>修改密碼||<a href="logout.php3"><font color=#FFFFFF>點選退出 <br> <br> <br> <p align="center"> Ex同學錄v1.0版本程式製作:<a href="mailto:y10k@963.net">y10k<br> <br> 歡迎訪問:<a href ="http://www.best4cn.com" target="_blank">http://www.best4cn.com <br>