Need to install extension SHMOPLocate the PHP installation source file directory
Copy Code code as follows:
# CD/USR/LOCAL/PHP-5.4.0/EXT/SHMOP
#/usr/local/php/bin/phpize
#./configure--with-php-config=/usr/local/php/bin/php-config
User registered password generally will not be saved in plain text, always add a secret first. The simplest of course is to call the MD5 function in the database SQL statement to encrypt the user's password. Here is an encryption and decryption
For example, an array like the following:
Copy Code code as follows:
$users = Array (
Array (' name ' => ' Tom ', ' age ' => 20)
, Array (' name ' => ' Anny ', ' age ' => 18)
, Array (' name ' => ' Jack ', ' age ' => 22)
);
The main use of the GD library two methods:
Copy Code code as follows:
Imagecolorallocatealpha//Assign color + Alpha
Imagesavealpha//Setting saves the full alpha channel information when you save the PNG image
code example:
Main points:
1. If the session_start () is not stated above, it needs to be stated;2, the font can be entered in the CMF fonts download to its own definition Fonts folder;3, $_session [$sess _name] can be compared by $_post to obtain the user input
Example one:
Copy Code code as follows:
Definition of Class
Class User
{
attribute, pay attention to the scope of public, private, protected
Public $name = "Hackbaby";
Constructors
function __construct ()
{
echo
Array_values ($arr) array
Returns all elements of an array
Copy Code code as follows:
$arr = Array ("A", "B", "C");
$arr = Array_flip ($arr); Reverses the subscript and value of an array now $arr = Array (0, 1, 2);
$arr =
Reflection is in the PHP running state, extended analysis of the PHP program, export or extract information about classes, methods, properties, parameters, etc., including comments. This dynamically acquired information, and the ability to
The connection between the browser and the server is communicated through the HTTP protocol. This is a protocol based on the request and response model. The browser initiates a request to the server through a URL, the WEB server receives the request,
Copy Code code as follows:
$a = ' 212345678912000005 ';
$b = ' 212345678912000001 ';
Var_dump ($a = = $b);
The output of this code is bool (true), which means that the judgment will conclude that the two are equal. Similar attributes are
1.__construct ()
The instantiated object is called automatically. Call __construct when __construct and a function with the class name function name exist, and the other does not call back.
The function of the class name is the old version of the
This article illustrates the XML operation class for the PHP implementation. Share to everyone for your reference, specific as follows:
new_xml (' Test.xml ');
$test->root (' document ');
$test->append_root_node (' book ');
$test->append_child_
I spent an afternoon, I wrote a PHP script to deal with the upload file script code, did not do more security processing, I hope to be useful.
First, add the following code to your Config.js file:
Copy Code code as follows:
PHP calculates the number of hours and breaks it down
Copy Code code as follows:
/* Author: Yangyu yangyu@sina.cn * *
Parameter $hours_min array with a format of 1:10, returned to 1 hours
/*
For example:
$hours _min[0] = ' 1:1
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