PHP + FastCGI + Nginx Dynamic Request Processing configuration, fastcginginx
Nginx does not support calling external programs. Therefore, you must use the FastCGI interface to call external programs to process client dynamic page requests.
CGI is
PHP uses JQueryJcrop to explain how to crop images,
We often see some websites with the image cutting function. You may think this function is gorgeous and mysterious! However, the jquery. Jcrop. min. js plug-in for image cropping will unveil the
PHP code for 301 redirection
The code for PHP to implement 301 redirection is as follows:
Header ('HTTP/1.1 301 Moved Permanently '); // issue the 301 header
Header ('location: http: // www. '. $ strDomain. $ request_uri); // jump to my new domain
A string of characters (consisting of uppercase and lowercase letters) when the input process of the simulated keyboard starts to be in lowercase, the input is required to be completed and the input is also in lowercase. the minimum number of
In the system, you can create an automatic number for a new file. For example, if the default file name of the new text file is "new text file .txt", the file name automatically changes when the new file is created: the new text file (2).txt, which
When declaring a member attribute in a class, there must be a modifier before it. when you are not sure which word to use, use var or public to save only one class, and the file name contains the class name.
Copy codeThe code is as follows:
/*
Generally, in our concept, variables should be composed of letters, numbers, and underscores. in PHP, Chinese characters can also be used as part of variables. today we will talk about PHP variables.
A valid variable name in PHP starts with a
Google found that Ffmpeg can be used to obtain video information for half a day. First, let's introduce FFMEPG.
Problem description; obtain the thumbnail and video duration of the flv video.
Google found that Ffmpeg can be used to obtain video
In actual encoding, to view and operate the memory, many programmers first think of the PHP script memory function PHPmemory_get_usage (). below is the PHP memory_get_usage () Usage example:
Copy codeThe code is as follows:
Echo memory_get_usage
If we need a select drop-down menu item, we can do this in ThinkPHP:
Before using tags, you must introduce the TP tag library:
If we need a select drop-down menu item, we can do this in ThinkPHP.
1. obtain data in the Action Controller
The scope of a variable is the context defined by the variable (that is, the range in which it takes effect ). Most PHP variables have only one separate range. This separate range span also contains the files introduced by include and require, for
Php concurrency causes pressure on MYSQL. For more information, see
On a PHP page, there is a browser count of 200 concurrent queries per second, which causes a lot of pressure on mysql due to insert.
In the lnmp environment, other page content is
Compatible: (PHP3, PHP4, PHP5) strpos -- Findpositionoffirstoccurrenceofastring: position syntax for the first occurrence of a character string: intstrpos (stringhaystack, mixedneedle [, javasffset]) return value: integer function type: data
Many problems are caused by Chinese characters. if the file name is better to use Chinese characters, the current solution is to generate an ID, this ID is used as a file name. if the url contains Chinese characters, the current solution often uses
Constructing a Web database application is a complex task. it is definitely worth having a reference book on relevant content. Realizing this need, o'reillyassociates has released a reference book with the usual high quality standards:
In our example, $ format_array is our new array, which contains the query results and is formatted for output. First, cycle every element in $ result_array and assign it to a two-dimensional array for sorting. At the same time, we use the strtolower
Every PHP programmer knows that PHP has a powerful regular expression function. for the convenience of future work, I sorted out information about regular expressions on the Internet to facilitate future work. Regularexpression describes a string
Note: I don't want to write it when I write it in half, so I am glad that the OutputControl function allows you to freely control the data output in the script. It is very useful, especially when you want to output the file header after the data has
How long is the lifecycle of a session? when the browser ends, its lifecycle also ends, but the file still exists in/tmp/(sess _???) 2. the sessionID will be re-allocated when you re-open the browser next time. if you use session_id () to bring back
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