A paging text-based PHP message board source code _ php instance

Source: Internet
Author: User
A paging text-based PHP message board source code beginner PHP compiled a message board program. I feel good about myself, so I put it up with a thick face. please correct me. The source program is as follows:

       
 N "; echo" alert ("Please enter at least the name and the message title. "); N"; echo "history. back ();"; echo "scriptN "; exit;} $ adddata = $ name. "t ". $ e_mail. "t ". $ url. "t ". $ title. "t ". $ data. "t ". $ icon. "t ". $ time. "n"; if (file_exists ($ guestfile) {$ filebuffer = file ($ guestfile); if (sizeof ($ filebuffer)> 100) {for ($ I = 0; $ I <100; $ I ++) $ newbuffer [I] = $ filebuffer [I];} else {$ newbuffer = $ filebuffer;} $ fp = fopen ($ guestfile, "w"); fputs ($ fp, $ adddata); fclose ($ fp); $ buffer = implode ("", $ newbuffer); $ fp = fopen ($ guestfile, "a"); fputs ($ fp, $ bu Ffer); fclose ($ fp);} else {$ fp = fopen ($ guestfile, "w"); fwrite ($ fp, $ adddata ); fclose ($ fp) ;}}?>
   Message Board      
 N ";} else {echo"N ";}?>
 
 

Power supply 9901 online space message board

"> [Back to homepage]

No message

";}Else {$ filebuffer = file ($ guestfile); $ size = sizeof ($ filebuffer); $ pages = ceil ($ size/20); echo"

Total ". $ size." message no. ". $ page." page/total ". $ pages." page
"; If ($ page> 1) {$ prev = $ page-1; echo" <";}for ($ I = 1; $ I <=$ pages; $ I ++) {echo "". $ I. "";} if ($ page <$ pages) {$ next = $ page + 1; echo ">>";} echo"

"; For ($ I = ($ page-1) * 20; $ I <$ page * 20 & $ I <$ size; $ I ++) {$ buffer = explode ("t", $ filebuffer [$ I]); echo" "; Echo" "; Echo" "; Echo" "; Echo" "; Echo" "; Echo" "; Echo" ";}}?>

". $ Buffer [3]."

(". $ Buffer [0].")

"; If ($ buffer [2]! = "0") {echo "homepage";} else {echo "homepage";} echo"

"; If ($ buffer [1]! = "0") {echo "E_Mail";} else {echo "E_Mail";} echo"

". $ Buffer [6]."

". $ Buffer [4]."

This website is made by the crazy computer Studio 2000

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.