InHeader ("Cache-control:private"); The cache of the Web page is controlled by the PHP cache controller in the HTTP message header, and the common values are private, No-cache, Max-age, must-revalidate, etc., and the default is private. Its function
We often use the actual coding in the need to take the whole, today we will give you a detailed introduction of some
Ceil of PHP floating-point type rounding------in-process roundingDescriptionfloat ceil (float value)Returns the next integer not
If we encounter a constant value that cannot be changed in actual programming, a constant is usually defined to use the constant value. Then we're going to use it.
When defining a constant, we can use the const to modify the constant, and the
PHP Programmers are mastering the
The inheritance of classes in PHP is one of the most used programming features, and we can create a base class (the parent Class) and then define some basic methods in this, in our subclass we can extend the method
When we use actual code writing, we often have dealings with the group, which is difficult for beginners. Today we are going to show you how to implement PHP to delete array elements.
The array in PHP to add elements is very simple, directly with
We all know that.Example code for PHP filtering strings:
? PHP
NL2BR ();
//N to br/>
Addslashes (); Stripslashes ();
Escape special characters when working against a database
Chop ();
Remove the right space from the string
US for
The first method is to use Php-f/path/to/yourfile.php. Invoke the PHP CLI interpreter and pass parameters to the script. This method first sets the path of the PHP interpreter, the Windows platform before running the CLI, you need to set a
Through theThe code for PHP to calculate the page execution time is as follows:
php
Class runtime
{
var $ StartTime = 0 ;
var $ StopTime = 0 ;
function Get_microtime ()
{
List ($usec, $sec) =
The writing of a program inevitably presents a variety of errors, so how can I handle these errors, or display errors so that we can find the changes? This uses the exception handling. Here we will introduce the concepts related to 5 exception
We pass onDefinition and usage
The Addslashes () function adds a backslash before the specified predefined character.
These predefined characters are:
Single quotation mark (')Double quotation marks (")Back slash ()Null
GrammarC
Parameter
We are using
For the reverse order of strings, the PHP function Strrev () has the following test code:
header (' content-type:text/html; CharSet = UTF -8 ');
$ Str = implode (', Range (9, 0));
print ' p>strong>before reversed:
We are using
PHP generates thumbnail HTML code
! DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 transitional//en">
HTML>
HEAD>
TITLE> upload images /title >
META NAME="Generator" CONTENT ="editplus">
Everyone through thephp function sizeof () syntax:
sizeof (ARRAYNAME);
Tips and Instructions
Note: This feature may return 0 if a variable is not set, but may also return 0 if a variable contains an empty array. The Isset () function can be used to
In this article we give you a detailed description of some
PHP reads the Excel file Class code example:
? PHP
Require_once '. /excel/reader.php ';
Excelfile ($filename, $encoding);
$ Data = New Spreadsheet_excel_reader ();
Set output
Since the session is stored as a text file on the server side, the client is not afraid to modify the session content. In fact, the server side of the session file, PHP automatically modify the session file permissions, only the system read and
We are using
The code examples for PHP XmlReader are as follows:
? PHP
Header ("content-type:text/html; Charset=utf-8 ");
$ URL = "http://www.google.com/Ig/api?weather=shenzhen ";
Loading XML content
$ XML = New XMLReader ();
JSON is a lightweight data format developed by a veteran software engineer Douglas Crockford, all known as JavaScript Object Notation. The Chinese translation is a "JavaScript object representation", which can easily be converted to a JavaScript
Here are some PHP IDE tools, non-common editplus and the like, are specifically for the development of PHP, interested can try to find out their own use of the right can, I recommend 3 Zend Studio,dzsoft PHP Editor,editplus, I use it now, I hope it
What we're introducing to you today is aboutThe following is a description of the Array_multisort function in the manual:
Array_multisort () can be used to sort multiple PHP two-dimensional arrays at once, or to sort multidimensional arrays based
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