Effect:
Put the following function in the functions.php file of your topic:Copy CodeThe code is as follows:function Theme_echo_pagenavi () {Global $request, $posts _per_page, $wpdb, $paged;$maxButtonCount = 9; Maximum number of links displayedif (!
First, define the array
You can use the array () language structure to create a new array. It accepts a number of comma-separated key = value parameter pairs.
Array ([key =>] value, ...)//key can be a number or string//value can be any value
Example
At present, there is an ASP program on the network of self-Friendship Connection Alliance is very popular, this program needs to fill in the title of their website, Web site, email, introduction and other content and then submit, and in their own
For example:
Class A {
Public $f 1 = ' xxxx ';
static public $f 2 = 100;
}
If you want to assign a variable to an object, you can initialize it only in the constructor, for example:
Class A {
Private $child;
Public Function __construct () {
$this->
Copy CodeThe code is as follows:
Calculate ID Check code, according to national standard GB 11643-1999
function Idcard_verify_number ($idcard _base) {
if (strlen ($idcard _base)! =) {return false;}
Weighting factor
$factor = Array (7, 9, 10, 5, 8, 4,
A friend to find a job to meet the questions, notes.
It is very likely that I will meet in the future.
Problem: PHP does not use built-in functions for array sorting, possibly descending or ascending
The first method: the legendary bubbling
Also, if the input data is illegal and the script is not detected, abort will make you unhappy.
That? What do we do?
Oh, don't worry, many processes to help you!
So, what is this for?
Advantages:
1. Using multiple processes, the kernel is
I think in the process of learning, we should know "play", make a sense of accomplishment, so that the effect of learning and enthusiasm will be very high,
Would like to learn more about their own things!
To illustrate:
Today, we learned some of the
How do you use this class? Take a look at the following demo:
Copy CodeThe code is as follows:
$temptime = time ();
Echo strftime ("%hh%m%A%d%b", $temptime);
$date = new Dateaccount ();
$temptime = $date->dateadd ("n", $temptime);
echo "
" ;Echo
And the data is the HTML code string, such as this:
Zhang San commented on a long list of articles shared by John Doe
Interception is to intercept the DIV tag inside the thing, and to keep the HTML tag, just to do the text in the processing. For
⚑ declaration and use of static variables
⚑ How custom constants are used
What is a static variable?
A static variable is a variable declared with static, and the difference between a variable and a local variable is that when a static variable
Copy CodeThe code is as follows:
/**
by Lenush;
*/
Class Tree
{
var $data = array ();
var $child = array ( -1=>array ());
var $layer = array ( -1=>-1);
var $parent = array ();
function Tree ($value)
{
$this->setnode (0,-1, $value);
}//End
Copy CodeThe code is as follows:
Get the current script URL
function Get_php_url ()
{
if (!empty ($_server["Request_uri"))
{
$scriptName = $_server["Request_uri"];
$nowurl = $scriptName;
}
Else
{
$scriptName = $_server["Php_self"];
if (Empty
Write it down before you can remember it and look around!
PHP operation of the database, the data in the database using UTF8 encoding, when read out, the display is all??????? The question mark was garbled, and some information was originally
Principle:
1. During the execution of the program, record the variables you want to trace, the call stacks, and the parameters of each function call in the appropriate place,
This information is recorded in a certain format to the file, a variable
We usually declare a class first, then use this class to instantiate an Object!
However, when we declare this class, we want to use the properties or methods of this class within the class itself. What should be said?
For example:
I declare a user
A PHP this,self,parent One of the differences in this articleObject-oriented programming (Oop,object oriented programming) has now become a basic skill for programmers. Using the idea of OOP for high-level programming of PHP is significant for
Copy CodeThe code is as follows:
/*
Code features: Use PHP to skillfully set the image by the time of creation to classify storage;
The picture file property must be removed from the read-only attribute, otherwise it cannot be deleted
by
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