First, Apache server security settings1, to nobody users to run
In general, Apache is installed and run by root. If the Apache server process has root privileges, it poses a significant threat to the security of the system and should ensure that
The Number_format () function formats a number by a thousands group.
Grammar
Number_format (Number,decimals,decimalpoint,separator)
Parameters
Description
Number
Necessary. The number to format.If no other
Recently, while looking at the code of a cow, see a very useful function: Extract (), its main role is to expand the array, the key name as variable name, element value is variable value, you can say that the operation of the array provides another
To use PHP to generate thumbnail images, make sure your PHP server has a GD2 graphics library that uses a class to generate thumbnail images of the pictures
1. How to use
$resizeimage = new Resizeimage ("Picture source file Address", "200",
Some functions in PHP, such as call_user_function () or Usort (), accept user-defined functions as a parameter. The Callback function can be not only a simple function, it can also be a method of an object, including a method of static classes.
A
Using PHP encoding to generate PDF files is a time-consuming task. In the early days, developers used PHP and fpdf to generate PDF files. But now, there are a lot of libraries available, and you can generate PDF documents from the HTML files you
The example in this article describes how PHP reads CSV data to an array. Share to everyone for your reference. The specific analysis is as follows:
CSV is commonly used in Excel format alternatives, many times we export the data will be in CSV
Read this PHP file_exists and is_file,is_dir The difference between the basic understanding, PHP file_exists = Is_dir + is_file.
Write a program to verify:
Execute 1000 times separately to record the time required.
File exists (current directory)
PDF Build PNG home Thumbnail (server needs support Imagick)
Copy Code code as follows:
/**
* Pdf2png
* @param $pdf PDF files to be processed
* @param $path picture path to save
* @param $page the page to be exported-1 is all 0 is
Copy Code code as follows:
$array =array (1,2,3,4,5);
Echo $array [Count ($array) -1];//computes the length of the array, and then gets the last element of the array, and if the last element in the array contains a Non-numeric key, the result
This article illustrates the way PHP intercepts HTML strings and automatically complements HTML tags. Share to everyone for your reference. The specific analysis is as follows:
Here is a summary of the use of PHP to intercept HTML strings
A comparison of examples
Example one:
Copy Code code as follows:
$var 1 = 1;
function Test () {
unset ($GLOBALS [' var1 ']);
}
Test ();
echo $var 1;
?>
Because the $var1 was deleted, nothing was printed.
Case TWO:
A. Internal sorting (directly loaded into memory for sorting): Includes interchange sort (bubbling and Quick Method), select Sort, insert sort
B. External ordering (because of the large amount of data that needs to be sorted by external storage):
This example summarizes the way PHP reads the contents of a file. Share to everyone for your reference. Specifically as follows:
Here's a summary of five ways PHP reads the contents of a file. In practical application, please pay attention to close
This article summarizes the PHP page caching method. Share to everyone for your reference. The specific analysis is as follows:
The main use of the PHP page cache is the OB series functions, such as Ob_start (), Ob_end_flush (), ob_get_contents (),
This example describes how to add XML document content through PHP. Share to everyone for your reference. The specific analysis is as follows:
Here's how to add XML document content, from the previous "Dom Basics and PHP read XML content Operation
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