Editor's note: This is a wonderful programming teaching article, not only detailed analysis of the principles of the search engine, but also provides the author's own use of PHP to compile some of the ideas of the search engine. The whole article in
Before we explain the concept of class, let's talk about the concept of object-oriented programming: Object-oriented program design (object-oriented programming, précis-writers as OOP) is intended to create software reuse code, with the ability to
Usage
Include ("counter.php");
Counter (__file__);//Add a count to the file
if ($PHP _self== "/index.php")
{
$count =counter ("Index_count");//Add a count to the home page
}
Else
{
$count =counter ("Index_count", "", 0);//Get home count
}
echo "You
PHP User Guide-cookies section
In this tutorial we will learn how to use PHP to process cookies, and I will try to make things as simple as possible to explain some of the practical applications of cookies.
What is a cookie and its role?
Cookies
The output control function gives you the freedom to control the outputs of the data in your script. It is very useful, especially when you want to output a file header after the data has been output. The output control function does not affect the
To view the list of international domains you are ready to delete:
Two websites from abroad
Http://www.pool.com/viewlist.aspx
http://www.deleteddomains.com/today_deletions.php
Foreign site speed is a bit slow
Domestic, international domain name
This article is translated because the current article on CGI security is taking Perl as an example, and there are few articles devoted to asp,php or JSP security. Shaun Clowes This article is a more comprehensive introduction of PHP security issues,
Arithmetic operators
Operator name Result
$a + $b addition $a and $b and
$a-the difference between $b subtraction $a and $b
$a * $b multiplication $a and the product of $b
$a/$b division $a divided by the quotient of the $b
$a% $b modulo $a divided
Large chains have a big problem. Every day, thousands of trades occur in each store. Company executives want to dig into the data. Which products sell well? What's bad? Where do organic products sell well? How about the sale of ice cream?
To capture
It is stated here that, in the example above, the LASTUPD field in the database table was incorrectly punched into a lastudp, and this case is corrected.
In addition to the Appeal field database is consistent with the previous example.
The project
Perhaps for some people, the article is too simple, this is a tutorial for beginners, because the time is tight (to accompany the wife shopping, hehe), which appeared the design is not standard, code writing is not standard, and so on, the bug and
I commonly use MySQL database, so the program only writes the MySQL database operation class. I hope that you master to write another class of all, the best can send a copy to me.
db_mysql.php inherit the db.php interface, the implementation of
192.168.1.1 Single IP
192.168.1.* such proxy 192.168.1.1-192.168.1-255
192.158.1.2-20 this is representative 192.158.1.2-192.158.1.20.
It is also possible to write 192.168.1. [1|2|3]
Hehe ~ a method does not know whether the idea is thoughtful, take
Checkdate ($month, $date, $year)If the applied value constitutes a valid date, the function returns to true. For example, for the error date February 31, 2005, this function returns FALSE.
Use this function to check the date and make the date
That is, if you assign a string value to the variable Var,var it becomes a string. If you assign an integer value to Var, it becomes an integer.
The type casts in PHP are very similar to those in C: precede the variables to be converted with the
1, year-month-day
echo Date (' y-m-j ');
2007-02-6
echo Date (' y-n-j ');
07-2-6
Uppercase Y represents the year four digits, while lowercase y represents the two digits of the year;
Lowercase m represents the number of months (with leading),
If you get a list of UID, the number is more than million lines, the format is as follows:
Copy CodeThe code is as follows:
10001000
10001001
10001002
......
10001000
......
10001111
In fact, using the characteristics of the PHP array, very good
The advantages are:
1. You can define multiple separators at once. When the function is executed, it is cut by a single delimiter rather than by the entire delimiter, while the explode is cut by the entire separator string. As a result, explode can
This function has been used to obtain:
Copy CodeThe code is as follows:
function Microtime_float () {
List ($usec, $sec) = Explode ("", Microtime ());
return (float) $usec + (float) $sec);
}
See someone else's source with Microtime (true), check
Copy CodeThe code is as follows:
echo Mktime (11,25,0,9,5,2010);//the same as time
Echo Microtime ();
echo Mktime (0,0,0,1,1,1970);
?>
The output is 1283657290, 1283657100, 0.88533200 1283657290, 25200, respectively. From the last value, we know
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.