Beautiful point:1, multi-cross scene distribution;2, PHP new features-closure use, batch processing functions array_walk/array_flip use;3, bit operation & use case;
Usage scenarios:1, common additions and deletions to check (2 of the N-second-side
Copy Code code as follows:
Disable error output
error_reporting (0);
Set Error processor
Set_error_handler (' ErrorHandler ');
Register_shutdown_function (' Fatalerrorhandler ');
Class test{
Public Function index () {
A warning error has
Duplicate data that begins with a number, such as:
Copy Code code as follows:
Array (
[0] => 100
[K1] => 100
[1] => 2123
[K2] => 2123)
This method can take the value of the number as key to remove, first the array in reverse order,
Share a case of PHP paging function code, using this function to implement the pagination code is very good.
Code, PHP paging function.
Copy Code code as follows:
/*
* Created on 2011-07-28
* Author:lkk, Http://lianq.net
* Use
Copy Code code as follows:
Class Xtable
{
Private $tit, $arr, $fons, $sextra;
Public Function __construct ()
{
$this->tit=array (); Strings with titles for row
$this->arr=array (); Data to show on cells
$this->fons=array ("#EEEEEE",
The idea of realizing infinite pole column classification: Get the ID (that is, the parent ID) and then get the child ID (that is, the UID child ID) to the database as followsId:1 uid:0 I'm column 1.Id:2 uid:1, I'm column 2.Id:3 Uid:1 I'm a subclass
I found this tutorial on the Internet, but basically nobody said anything. Then one day I saw a PHP program designed a database design like this a lot of understanding! The following is a structure diagram of the database
Now let's go on to the
The main contents of this section:Introduce a random display of pictures PHP function, more for the blog display window, photos of the random display.
Example:
Copy Code code as follows:
/**
* Function: Display pictures randomly
*
Email detection, password duplicate detection, can be used for form to send a variety of environments, such as sending feedback, registered account
Copy Code code as follows:
invalid name: We want names with more than 3
In this paper, several practical custom functions of PHP are summarized. Share to everyone for your reference, specific as follows:
Looking at the code recently, I found the following are some of the more useful functions.
1, take the client IP
This example describes the namespace use usage in PHP. Share to everyone for your reference, specific as follows:
Now say this feeling a bit outdated, but feel the use of namespace people still not much, estimates or because it is not used to it.
This article describes the PHP function timeout processing method. Share to everyone for your reference, specific as follows:
Register_shutdown_function
Registers the function named by function to being executed when script processing are complete
Schema definition
A delegate is a way to extend and reuse the functionality of a class. It does this by writing an additional class that provides additional functionality and uses an instance of the original class to provide the original
This article describes the PHP packaged web site and online compression as a zip method, to share with you for your reference, the specific content as follows
php zip compression program "> Online zip file program Usage: Select
This article introduces the PHP session to write the database method, share for everyone to refer to, the specific content as follows
config = $args;
$this->maxlifetime = Get_cfg_var ("Session.gc_maxlifetime"); Session_set_save_handler
The example of this article is about how to achieve the original scale of PHP to generate thumbnails. Share to everyone for your reference, specific as follows:
$y) {
//Picture wider than high
$SX = ABS (($y-$x)/2);
$sy = 0;
$THUMBW = $y;
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