PHP is a loosely-typed language
The connector "." is a point; the other language is "+";
注释PHP //HTML
CSS /* */
Memory_get_usage gets the memory consumed by the current PHP
When the echo output is Boolean, true output 1,false nothing
This article describes the construction SQL statement class implemented by PHP. Share to everyone for your reference, as follows:
/*** @package Database class* @author Injection (mail:injection.mail@gmail.com) * @version 1.0*/@ini_set (' Display_
Regular matching using Pcre library functions in PHP
Preg_match () commonly used to determine whether a class of character patterns exist
If the pattern contains delimiters, the delimiter needs to be escaped with a backslash (\)
/http:\/\//
Customer requirements, need to give customers a domain name, and then our big Niuqiang recommend not equipped with a domain name server, so unsafe, is generally external Web server to configure the domain name;
Install Nginx with another favorite
This paper analyzes the usage of SYMFONY2 session. Share to everyone for your reference, as follows:
Symfony from the method with the session, previous old version 2.2 and previous session usage is
$session = $this->getrequest ()->getsession (),
When there are many files in a directory, the server processing performance will be lower, PHP default session is only stored in the/tmp directory, not graded, when there is a certain amount of traffic, there is a performance problem.
First, modify
HTML tag associated with string formatting
If you use a normal post to receive web input information
";//echo stripslashes (Addslashes ($title))."";//echo htmlspecialchars ($title);}? >
This is what I enter
1234The result, but think very well,
It was written like this.
2 seconds to return to the back page. "; Header ("REFRECH:2; url=http://www.09-29.com/"); Header ("refresh:1;url=/"); }? >
////////////////////////////////////////////////////////////////////
Beginners to learn PHP, in a user name is a regular test, Zhang Sizhong's the name of how all said is wrong, crash!
Post code to record, see How to solve the future!
PS, Zhang San can be passed;
$_string= ' Zhang Sizhong's ';$_char_pattern= '/
How to run different versions of PHP on the same computer.
How to get a deeper understanding of PHP operating mechanism. In the process of learning other languages, think about whether PHP can do the same. Define a separate configuration item in
The example in this article describes how the twig template obtains global variables. Share to everyone for your reference, as follows:
In brief, Twig is a template engine that simplifies the process of writing PHP and improves efficiency.
In the
This paper summarizes and analyzes the new characteristics of PHP5.3. Share to everyone for your reference, as follows:
1. namespace resolves the problem of class, function and constant name conflicts
2. When a static binding inherits, the parent
PHP generates XML data
1) Assembling strings
2) using System classes
-DomDocument
-XMLWriter
-SimpleXML
Here is an example of the first method:
$code, ' message ' and $message, ' Date ' and $data); echo Json_encode ($result); Exit
The project uses the Php+nginx environment to run, each time modifies the code, must wait for a period of time to take effect, very annoying.
Just as soon as I was free today, I started to solve it. The main reason is that php caches opcode by
Before on the internet to find a lot of changes to modify the phpcms background path, but all too cumbersome (personal feeling), finally found a relatively simple method of modification, here and everyone to share, hope to learn from each
Custom error is that you can completely control the error and its prompt content
Setting errors are handled by a function of your own definition
set_error_handler('errName');
Set the function and customize the input and record of the
The biggest drawback of __autoload is the inability to have multiple autoload methods.Well, consider the following scenario, your project refers to someone else's project, your project has a __autoload, other people's project also has a __autoload,
# define Nginx running userUser root;# Nginx Process number, set to auto on behalf of Nginx will match itself, generally the number of CPU coresWorker_processes Auto;# Error log path and levelError_log Logs/error.log Notice;# PID File storage
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