Show all the messages
$c $db =mysql_select_db ("dbname", $conn); $numcolumns =8;//The number of records displayed per page
$query = "Select *from Guestbook"; $result =mysql_query ($query); $allnums =mysql_num_rows ($result);//calculation of all
Text-based message book. Although the message book of the base database can be very beautiful and better managed. However, for those friends who do not have database space, text-based message books can also be used as well as basic database message
Phpxml instance message book. Copy the code as follows :? Php open the XML file $ guestbooksimplexml_load_file (DBguestbook. xml) used to store messages; foreach ($ guestbook-threadas $ th) cyclically reads XML data
The code is as follows:
//
XML is a popular semi-structured file format that stores data in a database-like format. In practical applications, some simple, low-security data is often stored in the format of an XML file. The benefits of this can be achieved by reducing the
Database links
PHP's greatest feature is the ability to operate a database in a particularly powerful way, with PHP providing support for a variety of databases.
With PHP you can easily connect to a database, request data and display it in your
Copy CodeThe code is as follows:
Open the XML file for storing messages
$guestbook = simplexml_load_file (' Db/guestbook.xml ');
foreach ($guestbook->thread as $th)//iterate through each thread label in the XML data
{
echo "
Title:". $th->title."
"
Build a PHP environment by yourself. Build a PHP environment first. first install phpstudy2013.exe integrated package after installation may be occupied, you need to manually set the default user name root password 2. build thinkph self-built PHP
This article mainly introduces the use of ResourceAutoloading in the ZendFramework tutorial, and analyzes the principle and usage of ResourceAutoloading for automatic loading based on the instance form, for more information about Resource
Follow Your Heart (---) The first day of learning PHP
Yesterday did not sleep well, and P said, probably because you want to go, I did not sleep well yesterday, he said, certainly not, because of that hot pot, because I also uncomfortable stomach. I
Tutorial
"Test Address": http://wap.blueidea.com/tutorial/wapguestbook/Admin Address: http://wap.blueidea.com/tutorial/wapguestbook/admin.aspPlease test when you do not enter the illegal and reactionary information, otherwise I will only delete the
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.