When you use empty () to determine the number 0, empty () will also return true, that is, if your variable may appear the number 0 this variable, to use Isset () to judge it will be better!!
On the face of it, it is easy to misunderstand that the
Verify the mobile phone number we are using the PHP regular expression test verification, the mobile phone number of the rule is 11-bit length and then 13,15,18, and so on, we just need to classify the plan and to achieve the perfect mobile phone
Cookies are commonly used in some applications, I have a multi-level domain name to be able to access the primary domain binding cookie, let me give you a specific introduction in PHP using Setcookie to achieve a two-level domain name can
Here are four PHP generated random password functions Oh, simple and practical method is a user-defined encryption function, so if you do not know your encryption algorithm is difficult to crack.
Here are four php tutorials to generate random
Today is about the use of the empty function, and what the difference between, and use it to manipulate the array is not return the normal value, the need for friends can refer to.
The code is as follows
Copy Code
$
Based on jquery+php write smashing Golden egg winning program, jquery winning
First show us:
View Demo Download source code
Preparatory work
We need to prepare props (materials), which are related images, including pictures of golden eggs,
Assignment in PHP is assigned to a variable assignment and reference assignment, below I will give you some of their basic usage and differences.
1, Value assignment: Copies the value of an assignment expression to a variable. Example:
Let's start with a brief introduction about PHP bulk download image files and CSS in the method of the image, we will use the file_put_contents () function, the following see the first batch download pictures.
The code is as follows
The Opendir () function opens a directory handle that can be used by Closedir (), Readdir (), and Rewinddir (). If successful, the function returns a directory stream, otherwise it returns false and an error. You can hide the output of the error by
If you can find a little more careful to see a problem, we have a few crawl Baidu included or snapshot or hot Word program has a function file_get_contents (), he is the PHP collection page commonly used OH.
The code is as follows
//--------------------
Basic Data structure algorithm
//--------------------
Binary lookup (Find an element in an array)
function Bin_sch ($array, $low, $high, $k) {
if ($low $mid = Intval (($low + $high)/2);
if ($array [$mid] = = $k) {
return $mid;
In PHP to achieve paging is much simpler than ASP, our core is to directly get the current page and then determine how much per page to use limit in the database to achieve paged query, the following I would like to detail the implementation of
Currently PHP5 has released a third candidate version, and it is estimated that the official version will soon be released. The installation process should not change, the following article will tell Windows2000/xp/2003 (not recommended under
This article will introduce you to the solution of PHP-FPM startup specify user and group other than root, pool ' default '.
Install PHP, configure FPM to start discovery error after successful:
Starting PHP_FPM 06:51:54.269165 [ERROR] fpm_unix_conf_
#########################################
# #标题 A discussion of output buffering
# #整理 Diego Lynn @ Lam National
# #原作 by Zeev Suraski
#########################################
Discussion of output buffering (outputs buffering)
Directory
HTTP Header
Talked about the problem of using require_once to still tell that the class was redefined. So I think of the phenomenon I encountered the other day. Here and everyone to say, today only think of the specific reasons, if you do not say it is almost
In PHP, the loop statement includes a lot, such as: For,foreach,while,do While,goto statement, let me give you a brief introduction to these circular statement structure usage.
For loop control
For (cyclic initial value; loop condition; step)
In the study written in a PHP class and object learning notes, the following share with friends, I hope this tutorial for you to learn classes and objects helpful.
Personal notes made ..... For reference, if wrong please point out, thank you
In PHP, our function is relatively simple, but may be some friends of innocence function address or reference do not understand, the following small part to introduce in PHP function value and address (citation) introduced, I hope to help you.
Use
This file upload class can customize the upload file size and upload file type and file save address, use up also daxing very method, there is a text is if the Chinese file name is upload will be garbled, so everyone solution is to save the page to
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