php+html Simple Realization BBS Forum and reply

Source: Internet
Author: User
This article mainly discusses how to realize BBS forum and Post/reply function through php+html, which is part of extracting our PHP project. The main contents include:
1. Implementing a local layout interface via JavaScript and IFRAME
2.PHP How to define class implementations to access database functionality
3. Implement simple BBS forum and post/reply function
Since this project was completed by 10 people in winter vacation, the use of SAE to build an online backend database, others in the Apache local design page, access to the database method, equivalent to a simple BS three-terminal access.
SOURCE Download Address:
Access the http://localhost:8080/testphp/index.php effect as shown in:




I. Homepage layout construction

First, the layout of the home page, the main layout is divided into head, Main_left and Main_right. The right part of the display uses a partial display of the IFRAME implementation, while the left uses JavaScript for click-to-hide and display functions. Where index.php Home code is as follows:

 
    Distributed System "Fine Course learning  
  !--layout top login Status--> 
   
  
  
  
   
   !--head picture--> 
   
   
You're not logged in! | Login | Student Registration | Teacher Registration

!--Layout Central-->!--layout Central Right--> !--the middle left-->!--? phpinclude (' main_left.php ');?-->
The CSS code layout here calls the MYCSS.CSS implementation in the CSS file:
HTML, body {    height: ' 100% ';    Width: ' 100% ';} /* Header Layout */#main {margin-left:200px;width:950px;} /* Central Layout */#middle {width:950px;height:500px;background-color: #b6effa;} /* Central Left */#index_left {float:left;margin-top:10px;margin-left:10px;width:180px;height:480px;} /* Central Right */#index_right {float:right;margin-top:10px;margin-right:20px;width:720px;height:480px;border-style: Double;} /* Central Right */#logout_middle {float:right;margin-top:100px;margin-right:220px;width:500px;height:300px;border-style: Double;background-color: #ffffff;}
The main code in the IFRAME is , when called "BBS forum" declared that target is rightframe. Also hide the display setting Style.display to block or none. &lt;br/&gt; Where the main_left.php code is as follows, the above layout can be implemented at this time. &lt;br/&gt; &lt;pre name= "code" class= "Sycode" &gt;&lt;! DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 transitional//en" &gt;<ptml&gt;<pead&gt;&lt;meta http-equiv= Content-type content= "text/html; Charset=utf-8 "&gt;&lt;link href=" Css/admin.css "type=" Text/css "rel=" stylesheet "&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt; TABLE height= "100%" cellspacing=0 cellpadding=0 width=170 background=images/menu_bg.jpg border=0 align=left&gt; &lt;TR &gt; &lt;td valign=top align=middle&gt; &lt;table cellspacing=0 cellpadding=0 width= "100%" border=0&gt; &lt;TR&gt; &lt; TD height=10&gt;&lt;/td&gt;&lt;/tr&gt; &lt;/TABLE&gt;&lt;!--first option--&gt;&lt;table cellspacing=0 cellpadding=0 width= border=0&gt; &lt;tr height=30&gt; &lt;td style= "padding-left:20px; font-size:15px "background=images/menu_bt.jpg&gt; Course home &lt;/TD&gt;&lt;/TR&gt; &lt;tr height=4&gt; &lt;td&gt;&lt;/td &gt;&lt;/tr&gt;&lt;/table&gt;&lt;table Id=child1 style= "Display:none" cellspacing=0 cellpadding=0 width=150 border=0&gt; &lt;tr height=20&gt; &lt;TD align=mid Dle width=30&gt;&lt;/td&gt; &lt;TD&gt; Home Introduction &lt;/TD&gt;&lt;/TR&gt; &lt;tr height=4&gt; &amp;LT;TD colspan=2&gt;&lt;/td&gt; &lt;/TR&gt;&lt;/TABLE&gt;&lt;!--second Option--&lt;table cellspacing=0 cellpadding=0 width=150 border=0&gt; &lt;tr Height =30&gt; &lt;td style= "padding-left:20px; font-size:15px "background=images/menu_bt.jpg&gt; Course overview &lt;/TD&gt;&lt;/TR&gt; &lt;tr height=4&gt; &lt;td&gt;&lt;/td &gt;&lt;/TR&gt; &lt;/table&gt;&lt;table id=child2 style= "Display:none" cellspacing=0 cellpadding=0 width=150 border=0 &gt; &lt;tr height=20&gt; &lt;td align=middle width=30&gt;&lt;/td&gt; &lt;TD&gt; Course Introduction &lt;/TD&gt;&lt;/TR&gt; &lt;tr height=20&gt; &amp;LT;TD Align=middle width=30&gt;&lt;/td&gt; &lt;TD&gt; Faculty Team &lt;/TD&gt;&lt;/TR&gt; &amp;LT;TR Height=20&gt; &amp;LT;TD align=middle width=30&gt;&lt;/td&gt; &lt;TD&gt; Teaching conditions &lt;/TD&gt;&lt;/TR&gt; &lt;tr height=4&gt; &lt;td colspan=2 &gt;&lt;/td&gt;&lt;/tr&gt;&lt;/TABLE&gt; &lt;!--third option--&lt;table cellspacing=0 cellpadding=0 width=150 border=0&gt; &lt;tr height=30&gt; &amp;LT;TD style= "padding-left:20px; font-size:15px "background=images/menu_bt.jpg&gt; Interactive exchange &lt;/TD&gt;&lt;/TR&gt; &lt;tr height=4&gt; &lt;td&gt;&lt;/td &gt;&lt;/TR&gt; &lt;/TABLE&gt; &lt;table id=child3 style= "Display:block" cellspacing=0 cellpadding=0 width=150 border= 0&gt; &lt;tr height=20&gt; &lt;td align=middle width=30&gt;&lt;/td&gt; &lt;td&gt;bbs forum &lt;/TD&gt;&lt;/TR&gt; &lt;TR height=20&gt; &lt;td align=middle width=30&gt;&lt;/td&gt; &lt;TD&gt; Notice announcement &lt;/TD&gt;&lt;/TR&gt; &amp;LT;TR height=4&gt; &amp;LT;TD colspan=2&gt;&lt;/td&gt;&lt;/tr&gt; &lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;&lt;/pre&gt; shows the effect as follows: &amp;LT;BR/ &gt; &lt;p class= "Sycode" &gt; &lt;/p&gt; &lt;p class= "Sycode" &gt; &lt;br/&gt; &lt;/p&gt; &lt;p class= "Sycode" &gt; <p &gt; two. Implement BBS Forum and reply </p&gt; Forum mainly through the custom Class database folder httppost.php implementation, wherein main_right3-1.php is to display all BBS forum posts theme, and Main_ Right3-1-content.php is the content of the corresponding post, including the reply content. &lt;br/&gt; Which main_right3-1.php code is as follows: &lt;/p&gt; &lt;p class= "Sycode" &gt; &lt;pre name= "code" class= "Sycode" &amp;GT;&amp;LT;? Phpheader ("content-type:text/html; Charset=utf-8 ");//note: Include a PHP file can not be duplicated, to recursively check whether to repeatedly reference the include (". /database/httppost.php ");? &gt;&lt;!--need to be aware of "..." in HTML Represents back to the top level directory and CSS with main_right3-1.php sibling directory--&gt;&lt;link rel= "stylesheet" href= "Css/main.css" type= "Text/css"/&gt;&lt; TABLE cellspacing=0 cellpadding=0 width= "100%" Align=center border=0&gt; &lt;tr height=28&gt; &lt;TD &gt; Current location: BBS Forum &lt; /TD&gt; &lt;td align=right&gt; return &lt;/TD&gt; &lt;/TR&gt; &lt;TR&gt; &lt;td bgcolor= #b1ceef height=1 colspan= "2" &gt;&lt; /td&gt;&lt;/tr&gt; &lt;tr height=10&gt; &lt;td background=images/shadow_bg.jpg colspan= "2" &gt;&lt;/TD&gt;&lt;/TR &gt;&lt;/TABLE&gt; latest Hot Wait reply &lt;?php//query paste $hgi=new httppostinf (); $result = $hgi-&gt;doquery (' 2 ', "SELECT * from Bbs_post ;");/ /Parse Json$dj=json_decode ($result, true); $jcount =count ($DJ); for ($i =0; $i &lt; $jcount; $i + +) {?&gt; &lt;?php echo $dj [$i] [ ' Bp_pid '];?&gt; &lt;ul&gt; &lt;li&gt; "class=" Wendatitle "&gt;&lt;?php echo $dj [$i] [' bp_ptitle '];?&gt;&lt;/li&gt; &lt;li&gt;&lt;span class=" Replydet "&gt; Post identity: &lt;?php if ($DJ [$i] [' Bp_ptype ']==0] echo" Teacher "; if ($dj [$i] [' Bp_ptype ']==1] echo "student";?&gt; | Poster Number: &lt;?php echo $DJ [$i] [' Bp_puserid '];?&gt;&lt;/span&gt;&lt;/li&gt; &lt;li&gt;&lt;span class= "Time" &gt; Questions: &lt;?php echo $DJ [$i] [' bp_ptime '];?&gt;&lt;/span&gt; &lt;/ul&gt; &lt;!--qaslider--&gt; &lt;!--wenda-list--&gt; &lt;? PHP//End loop}?&gt;&lt;!--wrap--&gt;&lt;!--wrap_right--&gt; &lt;!--middle--&gt;&lt;table cellspacing=0 cellpadding=2 Width= "95%" Align=center border=0 &gt;&lt;tr height=20&gt; &lt;TD&gt;&lt;/TD&gt; &lt;/tr&gt;&lt;/table&gt;&lt;/pre &gt; Here we need to point out the HTML code ". /database/httppost.php "Medium" ... " Indicates that a directory is returned to the previous level, and the source code is placed in the Htdocs folder in Apache as shown in the code. &lt;br/&gt; &lt;p class= "Sycode" &gt; &lt;br/&gt; &lt;/p&gt; &lt;p class= "Sycode" &gt; where the main_right3-1-content.php code is as follows: &lt;br/&gt; &lt;pre name= "code" class= "Sycode" &gt;&lt;?phpheader ("content-type:text/html; charset=Utf-8 "); include (".. /database/human.php "); Session_Start () &gt;&lt;link rel=" stylesheet "href=" Css/main.css "type=" Text/css "/&gt;&lt; TABLE cellspacing=0 cellpadding=0 width= "100%" Align=center border=0&gt; &lt;tr height=28&gt; &lt;TD background=images/ Title_bg1.jpg&gt; Current Location: BBS Forum &lt;/TD&gt; &lt;td align=right&gt; back &lt;/TD&gt; &lt;/TR&gt; &lt;TR&gt; &lt;td bgcolor=# B1ceef height=1 colspan= "2" &gt;&lt;/TD&gt;&lt;/TR&gt; &lt;tr height=10&gt; &lt;td background=images/shadow_bg.jpg Colspan= "2" &gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TABLE&gt;&lt;!--PHP database get content--&gt;&lt;?php//query Bbs$hgi=new httppostinf ( ); $result = $hgi-&gt;doquery (' 2 ', "SELECT * from Bbs_post where bp_pid= '". $_get[' Bbsid ']. "'; '); Parse Json$dj=json_decode ($result, true); $jcount =count ($DJ); for ($i =0; $i &lt; $jcount; $i + +) {$_session[' bbsid ']= $dj [$ i][' Bp_pid '];? &gt; &lt;table cellspacing=0 cellpadding=0 width= "100%" Align=center border=0 bgcolor= "Blue" &gt; &lt;tr height=10&gt; &amp; Lt td&gt;&lt;/td&gt;&lt;/tr&gt; &lt;tr height=22&gt; &lt;td stylE= "padding-left:10px; Font-weight:bold; COLOR: #ffffff "align=left&gt;[paste" &lt;?php echo $dj [$i] [' bp_ptitle '];?&gt;&lt;/td&gt;&lt;/tr&gt; &lt;tr height=10&gt; &lt;TD&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TABLE&gt; &lt;!--landlord Content--&lt;table cellspacing=0 cellpadding=0 width= "95%" Align=center border=0&gt; &lt;tr&gt; &lt;td valign= "top" &gt;&lt;br/&gt;&lt;br/&gt; &lt;br/&gt;&lt;br/&gt; Landlord # &lt;BR /&gt; &lt;?php echo $dj [$i] [' Bp_puserid '];?&gt; &lt;br/&gt; Identity &lt;?php if ($DJ [$i] [' Bp_ptype ']==0] echo "Teacher"; if ($dj [$i] [' Bp_ptype ']==1] echo "Student", &gt;&lt;br/&gt;&lt;?php echo $DJ [$i] [' bp_ptime '];?&gt;&lt;/td&gt; &lt;!-- Multiline text input control disabled= "disabled" is not editable--&amp;LT;TD &gt;&lt;textarea rows= "" "type=" text "width=" 400px "style=" Resize:none , font-size:16px, "maxlength=" "name=" Content "cols=" disabled= "disabled" &gt;&lt;?php echo $DJ [$i] [' Bp_cont '];? &gt;&lt;/textarea&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr height=4&gt; &lt;td colspan= "3" &gt;&lt;/TD&gt; &lt;/TR&gt; &lt;tr &gt; &lt;td colspan= "2 "&gt;<pr width=" 100% "size=" 2 "color=" #FF0000 "&gt;&lt;/td&gt; &lt;/tr&gt;&lt;/TABLE&gt;&lt;!-- In PHP above the while loop does not end, there is a closing parenthesis--&gt;&lt;?php}//query bbs$hgi=new httppostinf (); $result = $hgi-&gt;doquery (' 2 ', "SELECT * from bbs_reply where br_pid= ' ". $_get[' Bbsid ']." '; '); Parse Json$dj=json_decode ($result, true); $jcount =count ($DJ); for ($i =0; $i &lt; $jcount; $i + +) {?&gt;&lt;!--Floor reply Content-- &lt;table cellspacing=0 cellpadding=0 width= "95%" Align=center border=0&gt; &lt;tr&gt; &lt;td valign= "Top" &gt;&lt;BR/&amp; gt;&lt;br/&gt; &lt;br/&gt;&lt;br/&gt; Floor &lt;?php $_session[' Bbshfid ']=time (); echo $i +2;? &gt;# &lt;br/&gt; &lt;?php echo $dj [$i] [' Br_ruserid '];?&gt; &lt;br/&gt; Identity &lt;?php if ($DJ [$i] [' Br_rtype ']==0] echo "Teacher" ; if ($dj [$i] [' Br_rtype ']==1] echo "Student",?&gt; &lt;br/&gt;&lt;?php echo $dj [$i] [' br_ptime '];?&gt; &lt;br/&gt; reply floor &lt;? PHP echo $DJ [$i] [' Br_pfloor '];?&gt;#&lt;/td&gt; &lt;!--multiline text input control disabled= "disabled" is not editable--&amp;LT;TD &gt;&lt; TextArea rows= "type=" text "width=" 400px "style=" Resize:noNE;FONT-SIZE:16PX, "maxlength=" "name=" Content "cols=" disabled= "disabled" &gt;&lt;?php echo $DJ [$i] [' Br_cont ' ];?&gt;&lt;/textarea&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr height=4&gt; &lt;td colspan= "3" &gt; &lt;/TD&gt; &lt;/TR&gt; &lt;tr&gt; &lt;td colspan= "2" &gt;<pr width= "100%" size= "2" color= "#FF0000" &gt;&lt;/td&gt; &lt;/tr&gt;&lt;/table &gt;&lt;?php}?&gt;&lt;!--reply content--&gt;&lt;!--wrap--&gt;&lt;!--wrap_right--&gt; &lt;!--middle--&gt;&lt;table cellspacing=0 cellpadding=2 width= "95%" Align=center border=0&gt;&lt;tr height=20&gt; &lt;TD&gt;&lt;/TD&gt;&lt;/TR &gt;&lt;/TABLE&gt;&lt;!--Submit current page POST database form processing--&gt;&lt;?phpif (!empty ($_post[' bbscontent ')) {if ($_session[' radio ') ==1) $a = 1; Student if ($_session[' Radio ']==2) $a = 0; Teacher//sql Update $sql = "INSERT into bbs_reply (br_rid,br_pid,br_ruserid,br_rtype,br_ptime,br_pfloor,br_cont) VALUES ("; $ SQL. = "'". $_session[' Bbshfid '. "',"; $sql. = "'". $_session[' Bbsid ']. "',"; $sql. = "'". $_session[' number ']. "',"; $sql. "'". $a. "',"; $sql. = "'". Date (' y-m-d '). "', '; $sql. = "'". $_post[' LC ']. "',"; $sql. = "'". $_post[' Bbscontent ']. "'"; $sql. = ");"; /update information//echo $sql; $hgi =new httppostinf () $result = $hgi-&gt;doquery (' 1 ', $sql);//echo ""; Header (' Location:main_ Right3-1.php ');}? &gt;&lt;/pre&gt; Post reply display effect as shown: &lt;br/&gt; &lt;p class= "Sycode" &gt; &lt;/p&gt; &lt;p class= "Sycode" &gt; &lt;br/&gt; &lt; P class= "Sycode" &gt; post code is not posted out, you can view the source code. Write here you may be confused about the contents of the Database Access section, below for a brief explanation! &lt;br/&gt; &lt;br/&gt; &lt;/p&gt; &lt;/p&gt; &lt;/p&gt; &lt;/p&gt; <p&gt; three. PHP definition classes and member functions </p&gt; In PHP We usually complete the course of the site is based on a process-oriented approach, thus ignoring its object-oriented knowledge, I obviously made such a mistake. &lt;br/&gt; PS: Because this project is "object-oriented Analysis and development" course work, so need to use object-oriented knowledge to analyze and implement. Suddenly one day I found that PHP used to be HTML and PHP layout behind the implementation of the background, no use of class, encapsulation, inheritance of knowledge, but to check the relevant information found that it has these things. &lt;br/&gt; Later in the implementation of this project we defined different classes (thanks to Pu elder brother), here only for example database aspects and human class. &lt;br/&gt; &lt;pre name= "code" class= "Sycode" &gt;&lt;?phpheader ("content-type:text/html; Charset=utf-8 "), Class httppostinf{function __construct () {//parameterless constructor} function Doquery ($type, $sql) {//network communication function $data = Arra Y (' sqltype ' = $type, ' sqlExe ' = $sql); $data = Http_build_query ($data); $opts = Array (' http ' = = Array (' method ' = ' + ' POST ', ' header ' = ') ' content-type:application/x-www-form-urlencoded\ r\n "." Content-length: ". Strlen ($data). "\ r \ n", ' content ' = $data)); $context = Stream_context_create ($opts); $html = file_get_contents (' http://courseweb.sinaapp.com/courseweb.php ', False, $context); return $html;}}? &gt;&lt;/pre&gt; defines the human class at the same time, while the student and teacher that inherit the class are the logged-in users of both identities. Where constructors and instantiations are already written in the member function. &lt;br/&gt; &lt;pre name= "code" class= "Sycode" &gt;&lt;?phpheader ("content-type:text/html; Charset=utf-8 "); Include_once (" httppost.php ");//human beings, with the common attributes and methods of teachers and students class human{private $hid;//unique number private $pwd; Password private $name; Name Private $sex; Gender private $email; Mailbox function __construct () {//parameterless constructor}//static validation function id_vf ($id, $spwd, $type) {//class static method type=1 for students, 2 for teacher $hpi=new Httppostinf (), if ($type ==1) {$result = $hpi-&gt;doquery (' 2 ', "SELECT * from Student_info where sinf_id= '". $id. "';"); if ($result = = ' ERROR ' | | $result = = ' nulL ') {//return no value return-1;//no user, return 0} else{$dj =json_decode ($result, true); $jcount =count ($DJ); for ($i =0; $i &lt; $jcount; $i + +) {//Only one password $right _pwd= $dj [$i] [' sinf_pwd '];//Student login Password} if ($spwd = = $right _pwd) return 1; Validation succeeds, can login else return 0;//password error}}else if ($type ==2) {$result = $hpi-&gt;doquery (' 2 ', "SELECT * from Teacher_info where ti_i D= ' ". $id." '; "); if ($result = = ' ERROR ' | | $result = = ' null ') {//returns no value return-1;//no user, returns 0} else{$dj =json_decode ($result, true); $jcount = Count ($DJ); for ($i =0; $i &lt; $jcount; $i + +) {//Only one password $right _pwd= $dj [$i] [' ti_pwd '];//Student login Password} if ($spwd = = $right _pwd) return 1; Verification successful, can login else return 0;//password error}}}}class Student extends human{private $bir;//Birth date private $maj;//professional private $eym;//into the school year Private $score; Scoring function __construct ($sid) {//1 parameter constructor $this-&gt;hid= $sid; $stu =new httppostinf () $result = $stu-&gt;doquery (' 2 ', " SELECT * from Student_info where sinf_id= ' ". $sid." '; "); Echo ' Result: ' $result;//Parse Json$dj=json_decode ($result, true); $jcount =count ($DJ); for ($i =0; $i &lt; $jcounT $i + +) {//return only 1, so take only one, jcount=1$this-&gt;bir= $DJ [$i] [' Sinf_bir ']; $this-&gt;maj= $DJ [$i] [' Sinf_maj ']; $this Eym= $DJ [$i] [' Sinf_eym ']; $this-&gt;score= $DJ [$i] [' Sinf_score ']; or write: $score = $dj-&gt;sinf_bir; $this-&gt;pwd= $dj [$i] [' sinf_pwd ']; $this-&gt;name= $DJ [$i] [' sinf_name ']; $this sex= $DJ [$i] [' sinf_sex ']; $this-&gt;email= $DJ [$i] [' Sinf_email '];} } function GetName () {return $this-&gt;name;} function Getsex () {return $this-&gt;sex;} function Getemail () {return $this-&gt;email;} function Getpwd () {return $this-&gt;pwd;} function Getbir () {return $this-&gt;bir;} function Getmaj () {return $this-&gt;maj;} function Geteym () {return $this-&gt;eym;} function Getscore () {return $this-&gt;score;}} Class Teacher extends Human{private $ptitle;//title Private $res;//results private $award;//award winning function __construct ($tid) {//1 parameter construction function $this-&gt;hid= $tid $stu =new httppostinf () $result = $stu-&gt;doquery (' 2 ', "SELECT * from Teacher_info where ti_id= '". $tid. "';"); /echo ' Result: '. $result;//Parse Json$dj=json_decode ($result, true); $jcount=count ($DJ); for ($i =0; $i &lt; $jcount; $i + +) {//return only 1, so take only one, jcount=1$this-&gt;ptitle= $DJ [$i] [' ti_ptitle ']; $this- &gt;res= $DJ [$i] [' ti_res ']; $this-&gt;award= $DJ [$i] [' Ti_award ']; or write: $score = $dj-&gt;sinf_bir; $this-&gt;pwd= $dj [$i] [' ti_pwd ']; $this-&gt;name= $DJ [$i] [' ti_name ']; $this-&gt;sex= $DJ [$i] [' ti_sex ']; $this-&gt;email= $DJ [$i] [' Ti_email '];}} function GetName () {return $this-&gt;name;} function Getsex () {return $this-&gt;sex;} function Getemail () {return $this-&gt;email;} function Getpwd () {return $this-&gt;pwd;} function Getptitle () {return $this-&gt;ptitle;} function Getres () {return $this-&gt;res;} function Getaward () {return $this-&gt;award;}}? &gt;&lt;/pre&gt; re-invoke the class Httppostinf and human defined above to implement the simple code that accesses the database as follows: &lt;br/&gt; &lt;?php &lt;br/&gt;//query paste &lt;br/&gt; $hgi =new Httppostinf (); &lt;br/&gt; $result = $hgi-&gt;doquery (' 2 ', "select * from Bbs_post;"); /sql statement &lt;br/&gt;//parsing json &lt;br/&gt; $dj =json_decode ($result, true); &lt;br/&gt; $jcount =count ($DJ); &lt;br/&gt; for ($i =0; $i &lt; $jcount; $i + +){&lt;br/&gt; echo $dj [$i] [' bp_pid ']; &lt;br/&gt;} &lt;br/&gt;?&gt; &lt;br/&gt; And when the user logs in, the user's ID is logged with the session and then instantiated through the class. Now get all the information of the user, the simple code is as follows: &lt;br/&gt; $h 1=new Student (' 2220140598 '); &lt;br/&gt; Echo $h 1-&gt;getname (); Echo ' &lt;br&gt; '; &lt;br/&gt; Echo $h 1-&gt;getsex (); Echo ' &lt;br&gt; '; &lt;br/&gt; Echo $h 1-&gt;getemail (); Echo ' &lt;br&gt; '; &lt;br/&gt; &lt;br/&gt; Finally hope that the article is helpful, especially found that the PHP construction of the article is relatively small! Relatively many articles are PHP about a specific processing, but also want you to learn the PHP class related knowledge. I always feel that I have some problems in blogging, but I can't say it, and I hope we have some shortcomings! The code database is laid out on the SAE, so running directly can result in all of the above graphics. &lt;br/&gt; (By:eastmount 2015-3-14 4 o'clock in the afternoon) &lt;li &gt;&lt;i class= "Layui-icon" &gt;&amp; #xe63a;

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.