Paging is the best way to present a large number of results. With the help of the following code, developers can display large amounts of data in multiple pages. On the Internet, pagination is generally used for search results or to browse through
PHP design mode:
The adorner mode of PHP design pattern
The delegate mode of PHP design pattern
The appearance mode of PHP design pattern
The factory model of PHP design pattern
The interpreter mode of PHP design pattern
The iterative mode of
php Time parameter list:
A-"AM" or "PM"A-"AM" or "PM"D-A few days, two digits, if less than two digits before the 0; such as: "01" to "31"D-Days of the week, three English letters; such as: "Fri"F-month, full name in English; such as:
1. Analysis of
we use PHP to create a site, classification is very important, under the classification and then classification of the second category called the secondary classification, and now most of the site classification is only divided
such as the display window of the blog
Copy CodeThe code is as follows:
/**********************************************
* Filename:img.php
* Author:freemouse
* Web:www.cnphp.info
* email:freemouse1981@gmail.com
* DATE:2010/12/27
* Usage:
*
*
*****
Program | Thumbnail client uploaded page:
--------------------upload.htm---------------------
Method= "POST" action= "upload.php" >
Please select or enter the upload file name:
---------------------upload.php-------------------
?
if (empty
Copy Code code as follows:
$a = Array (' A ', ' B ', ' C ', ' d ');
Unset ($a [2]);
Print_r ($a);
But the biggest disadvantage of this approach is that the array index is not rebuilt.
After checking the data, PHP provides this functionality.
dom|xml| function
DOM XML functionsThese functions are only available if PHP is configured with--with-dom=[dir], using the GNOME XML library. You'll need at least libxml-2.0.0 (the beta version won't work). These are functions have been added in PHP4
Excel| Build Excel
PHP to generate Excel documents is too simple, it is estimated that everyone will use, so share out.Let's look at the code:?Header ("Content-type:application/vnd.ms-excel");Header ("Content-disposition:filename=test.xls");echo
Auto Jump
?PHP self-with functionsHeader ("location:http://www.phpx.com");?>?Leveraging metaecho " ';?>
?
Use JavaScript languageecho "";?>
————————————————-Note: When you use the header function, you must not produce any output from the page,
Visit | design | page
At night someone asked me about the Site page display, the right to judge the problem. So I have this article again.
In fact, there are many ways to achieve this.1, you can be in each page alone to judge the right, this is the
Function
file Lookup function php
CODE:
/* File Lookup functionUsage:FindFile (directory, whether to traverse subdirectories, whether to find the contents of the file, not lookup
Oh, suddenly a friend asked me how to delete the directory, such as the following files, I said with a pass, he said too slow. So we summed up the following methods.
1. Recursive method://I provide, it seems a bit wrong, no test
Deletedir ($dir){if (
Body:
Send email online, you can use the mail () function. The format is as follows:
Mail (addressee, subject, content, mail file header);
On the Internet, send email to stationmaster, usually is such: webmaster@163.com So, When clicked the Webmaste
A simple cache example (but a little too simple!) )
?//create "cache" directory first to write files function Bz_cache ($url, $cacheName)??{Global $cache;??Global $QUERY _string;Can you name it in your own custom??$filename = "cache/". $cacheName. ",
Now, almost every blog has its own RSS aggregation system, for RSS, the following small program, to achieve the synchronization with the blog call.
The following are the referenced contents:The file Test.xml contains an XML document
The character set is of course of many kinds, in mainland China is mainly used GB2312, but sometimes we should consider the foreign friends visit your site, then you should use UTF-8, in fact, this is a trend bar, a lot of domestic sites are also
2. Planning of the database
------------------------------------------------------------
The complexity of classification is discussed earlier, so how to plan a database is a very important step in achieving infinite classification.
I have
PHP is installed in CGI to Apache 2.0:
Insert the following instruction into the Apache httpd.conf configuration file to set up the CGI binaries:
scriptalias/php/"c:/php/"AddType application/x-httpd-php. phpAction application/x-httpd-php
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