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),
Using single quotes instead of double quotation marks to contain strings can be faster. Because PHP will search for variables in a string surrounded by double quotes, single quotes will not, note: only echo can do this, it is a string can be used as
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
Take a look at the following example:
Copy CodeThe code is as follows:
function Test ()
{
$w 3sky = 0;
echo $w 3sky;
$w 3sky++;
}
?>
Each call to this function sets the value of $w 3sky to 0 and outputs "0". Adding a variable to the $w 3sky++
The file object in the form, such as $_files[' Doc ', $path for the saved path, $type to restrict the type of upload (he is an array, such as restricting the upload of doc and docx and format, that parameter can be filled in with an array ("Doc", ".
Definition of a variable
Types of ⚑ variables
Use of ⚑ variables
Variables are objects that can be constantly changed in memory, we can think of memory as a street, there are many households in the street, each tenant will have their own house
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
Do a normal animation effect, JS is how to complete it. Take a look at the example
Copy CodeThe code is as follows:
SetInterval (function () {
Element.style.left =parsefloat (element.style.left) + (n) + ' px ';
},10);
Test
[Ctrl + A full
The process is as follows:
First, the entity is saved with this method (the system itself):
For example, there is an activity class that inherits from Elggobject, creating an instance of it activity,
Copy CodeThe code is as follows:
Now see if we
I. Introduction to XML
XML (Extensible Markup Language) is a standard that is used primarily for easy interaction between Web applications and servers, and for the storage and use of data.
Data encoded using XML standards has the meaning and
Values to be judged.
Very simple, give an example.
method One:
Copy CodeThe code is as follows:
$sql = "SELECT * Form ABC"
$result = mysql_query ($sql);
$row = Mysql_fetch_array ($result);
if (empty ($row))//Start judging is enough empty
{
echo
Suppose you now have a picture file whose server-side path is:
$path = "/www/mywebsite/images/myphoto.jpg";
1.pathinfo () functionThe PathInfo () function returns an array containing the file information, with four elements, dirname, basename,
Round
Round-Rounding the floating-point number. The round function syntax is as follows:
Round (float,precision)
Where the parameter precision represents the number of precision digits to be persisted after the decimal point. If the parameter
The prototype of the Find function
Copy CodeThe code is as follows:
/**
* Returns the first record that meets the criteria and all associated data, and the query returns false with no results
*
* @param mixed $conditions
* @param string $sort
*
Copy CodeThe code is as follows:
/**
* File Upload Class
*/
Class UploadFile {
Public $max _size = ' 1000000 ';//set Upload file size
Public $file _name = ' date ';//renaming means naming by time, others using given name
Public $allow
Copy CodeThe code is as follows:
Yum-y Install OpenSSL
/usr/local/bin/is the installation directory for PHP
Switch to the Etx/openssl directory of the PHP installation directory
Cd/root/soft/php-5.2.8/ext/openssl
Copy CodeThe code is as follows:
/
What is Pear
Pear is an abbreviation for the PHP extension and application library (the PHP Extension and application Repository). It is a PHP extension and application of a code warehouse, in short, pear is the PHP cpan.
Why to install
The situation is as follows:1, click on the Guarantee button, can not go to the page normally, there is a blank page;
2, refresh the page, issued many items in the navigation is no longer, there is still a click on the item can not enter the normal
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