This example was originally used for our class. Because the server does not support MySQL, DBM is selected.
There is no dBm in China
Program And almost none abroad
It took me one night to write it out without any reference.
Published now
Is a very good dBm use example
1. Index. php3If ($ login ){?>
$ DBm = dbmop
This alumni originally to our class use, because the server does not have MySQL support, chose dbm
There is no dbm program in China, and there is hardly any foreign
Spent a night, in the case of scarcely any reference to write out
Now publish it.
is a very good example of dbm usage
1, INDEX.PHP3
?
if ($login) {
?>
?
$DBM
PHP + DBM logging program (5 ). 10. member information display file show. php3? If ($ login) {require (common. php3); if (! Isset ($ id) error (why didn't I enter the user ID ?); Else {$ idchop ($ id); $ dbmdbmopen (class, r); if (! Db 10. member information display file show. php3
If ($ login ){
Require ("common. php3 ");
If (! Isset ($ id) error ("Why didn't I enter the user ID? ");
Else {
$ Id = chop ($ id );
$
First of all, I used Perl to save files in the DBM database with more than 50,000 records and 15 fields per record. Now want to use MySQL, to the record guide over. The first step, all the DBM records are imported into a text file, each field is separated by a tab ("T"), and the end of each line wraps. The second section reads the data into an array and opens the database and defines preprocessing as foll
PHP + DBM logging program (5) 10. member information display file show. php3
If ($ login ){
Require ("common. php3 ");
If (! Isset ($ id) error ("Why didn't I enter the user ID? ");
Else {
$ Id = chop ($ id );
$ Dbm = dbmopen ("class", "r ");
If (! Dbmexists ($ dbm, $ id) error ("this user id is not available! ");
Else {
$ Data = dbmfetch ($
10, member information display file SHOW.PHP3
if ($login) {
Require ("common.php3");
if (!isset ($id)) error ("How do I not fill in the user ID?") ");
else{
$id =chop ($id);
$DBM =dbmopen ("Class", "R");
if (!dbmexists ($DBM, $id)) error ("Without this user id! ");
else{
$data =dbmfetch ($dbm, $id);
$info =explode ("|!:!|", $data);
$name = $info [0]; $nickname =
10. show. php3 lt ;? If ($ login) {require ( quot; common. php3 quot;); if (! Isset ($ id) error ( quot; why didn't I enter the user ID? Quot;); else {$ idchop ($ id); $ dbmdbmopen ( quot; class q 10. member information display file show. php3
If ($ login ){
Require ("common. php3 ");
If (! Isset ($ id) error ("Why didn't I enter the user ID? ");
Else {
$ Id = chop ($ id );
$ Dbm = dbmopen ("class", "r ");
If (! Dbmexists ($
10. Member information display file show. php3If ($ login ){Require ("common. php3 ");If (! Isset ($ id) error ("Why didn't I enter the user ID? ");Else {$ Id = chop ($ id );$ Dbm = dbmopen ("class", "r ");If (! Dbmexists ($ dbm, $ id) error ("this user id is not available! ");Else {$ Data = dbmfetch ($ dbm, $ id );$ Info = explode ("|! :! | ", $ Data );$ Name =
3. Delete member del. php3Require ("common. php3 ");$ Id = chop ($ id );If (! Isset ($ id) error ("Enter the user id to delete! ");Elseif ($ pwd Else {$ Data = dbmopen ("class", "w ");Dbmdelete ($ data, $ id );Dbmclose ($ data );$ Data = dbmopen ("password", "w ");Dbmdelete ($ data, $ id );Dbmclose ($ data );Header ("location: index. php3 ");}?>4. Public file common. php3$ Adminpass = "test ";Function error ($ msg ){?>Error cause: Style = "font-size: 9pt "> }?>5. log on to the login. php3 file.R
1. DBMDBM is the absolute value of power. The formula is: 10lgp (power value/1 MW ).[Example 1] If the transmit power P is 1 MW, it is converted to dBm and then 0dbm.[Example 2] for 40 W power, the converted value in dBm unit should be:10lg (40 W/1 MW) = 10lg (40000) = 10lg4 + 10lg10 + 10lg1000 = 46dbm.
2. DBI and DBDDBI and DBD are the obtained Gain values (power gain). Both are relative values, but the
10, member information display file SHOW.PHP3
?
if ($login) {
Require ("common.php3");
if (!isset ($id)) error ("How did you not fill in the user ID?") ");
else{
$id =chop ($id);
$DBM =dbmopen ("Class", "R");
if (!dbmexists ($DBM, $id)) error ("No this user id! ");
else{
$data =dbmfetch ($dbm, $id);
$info =explode ("|!:!|", $data);
$name = $info [0]; $nickname =
3. Delete member del. php3
Require ("common. php3 ");
$ Id = chop ($ id );
If (! Isset ($ id) error ("Enter the user ID to delete! ");
Elseif ($ PWD Else {
$ DATA = dbmopen ("class", "W ");
Dbmdelete ($ data, $ id );
Dbmclose ($ data );
$ DATA = dbmopen ("password", "W ");
Dbmdelete ($ data, $ id );
Dbmclose ($ data );
Header ("Location: Index. php3 ");
}
?>
4. Public file common. php3$ Adminpass = "test ";Function error ($ MSG ){?>Error cause: Style = "font-size: 9pt "> }?>
5. log on to the
10. Member information display file show. php3
If ($ login ){
Require ("common. php3 ");
If (! Isset ($ id) error ("Why didn't I enter the user ID? ");
Else {
$ Id = chop ($ id );
$ DBm = dbmopen ("class", "R ");
If (! Dbmexists ($ dBm, $ id) error ("this user ID is not available! ");
Else {
$ DATA = dbmfetch ($ dBm, $ id );
$ Info = explode ("|! :! | ", $ Data )
10, member information display file SHOW.PHP3
?
if ($login) {
Require ("common.php3");
if (!isset ($id)) error ("How did you not fill in the user ID?") ");
else{
$id =chop ($id);
$DBM =dbmopen ("Class", "R");
if (!dbmexists ($DBM, $id)) error ("No this user id! ");
else{
$data =dbmfetch ($dbm, $id);
$info =explode ("|!:!|", $data);
$name = $info [0];$nickname = $
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.