Used to display error messages and success messages, you can actually echo the error message directly, here I just want my error message page beautiful point, defined a page output function.
Copy CodeThe code is as follows:
savecomment.php//people
Main function Description
Removed the functionality of the Discuz language pack
Porting all of the features in the Discuz template
Added automatic Update cache and lifecycle features
The use of the template in the same way as discuz, so do not make
The most basic way to page paging:
SELECT ... From ... WHERE ... ORDER by ... LIMIT ...
In the case of small amounts of data, such SQL is sufficient, and the only problem to be aware of is that the index is used:
For example, if the actual SQL is
Using the following method, you can see the use of minixml, compared with activelink-php-xml-package-0.4.0, more in line with the use of habits, but also more simple.
$xmlDoc = new Minixmldoc ();
$xmlRoot =& $xmlDoc->getroot ();
$childElement =&
The JS code is as follows:
Copy CodeThe code is as follows:
Maximum data volume
var total= "100";
The amount of display per page
var pagesize=10;
How many pages are there?
var pagenum=math.ceil (total/pagesize);
Build navigation
function
Copy CodeThe code is as follows:
$perpagenum = 10;//definition shows several pages per page
$total = Mysql_fetch_array (mysql_query ("SELECT count (*) from a"));//Query the database for the total number of data
$Total = $total [0]; //
$Totalpage =
You can use->, if the property of an object contains an object, you can get the properties of the inner object using two-> operators. You can even place these expressions with double-referenced strings. In the following example, the property house
Copy CodeThe code is as follows:
function GetIP () {//Get IP
if ($_server["http_x_forwarded_for"])
$ip = $_server["Http_x_forwarded_for"];
else if ($_server["HTTP_CLIENT_IP"])
$ip = $_server["Http_client_ip"];
else if ($_server["REMOTE_ADDR"])
$ip =
Packaging features ~ easy and convenient! The compression ratio is a little bit worse than WinRAR, but it doesn't matter. After all, only package to download
Save yourself to go to the server to pack the site if the server is not their own more
But there are at least two of the most obvious advantages of using stored procedures: speed and efficiency. The speed of using stored procedures is obviously faster. In efficiency, if the application needs to do a series of SQL operations at a time,
PHP Code:
$lan = substr (? $HTTP _accept_language,0,5);
if ($lan = = "ZH-CN")
Print ("
");
Else
Print ("
");
?>
HTML pages automatically jump to multilingual pages based on the browser language you visit
Add the following code between them.
Copy CodeThe code is as follows:
Connecting to a database
$db =mysql_connect ("localhost", "root", "");
mysql_select_db ("Hy", $db);
Set the number of records to display per page
$pagesize = 25;
Get the total number of records, calculate the total
The front of the # is gone, but not loaded, look carefully, oh, there is a
Extension=php_pdo.dll
So, it's OK.
By the way, do not copy the DLL file under the Windows directory, in the environment variables to add the path of PHP in the line, so good
Snoopy is a PHP class that mimics the functionality of a Web browser, which accomplishes the task of getting web content and sending forms.
Here are some of its features:
1, easy to crawl the content of the Web page
2, easy to crawl the text of the
Whatever you do, the idea is to pass SQL statements to the MySQL database via PHP, let the database execute add or delete commands, and finally get the results we want. PHP is like a bridge, connecting a Visual Web page to a database in 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.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service