Learning steps: In four chapters to describe this part of the content, the following is the general content of each chapter.
1, understand the development model and editing mode, some preparation before development.2, Development mode users,
On the internet to find some of the windows to execute the task of PHP planning method, there is a very full, but unfortunately in my this unexpectedly failed. Finally have to synthesize the methods of the various factions in order to run
But there's a problem.
Although JS is very handy for decoding JSON, coding does not seem to be a good idea ...
In the spirit can lazy is lazy, not lazy also as lazy as possible principle, the old dog a bit
It really made me find out.
PHP directly
1, prevent from jumping out of the web directory
First modify httpd.conf, if you only allow your PHP script to operate in a Web directory, you can also modify the httpd.conf document to restrict the operation Path of PHP. For example, if your web
Nginx was developed by Igor Sysoev, the second rambler.ru site for Russian traffic, which has run over 2.5 at the site. Igor releases the source code in the form of a BSD-like license.
In the case of high concurrent connections, Nginx is a good
Everyone has the experience of commenting on the site, the traditional publishing process is nothing more than: Publish-> submit page form-> waiting to refresh the page, so in the network more crowded, often need a long wait, today introduced with
The Internet Information Services (IIS) built into Windows systems have good support for ASPs, so it is convenient to debug ASP Web pages in IIS. But some friends of the Web page with PHP programming technology, by default, IIS is not support PHP,
In addition to restricting access, the access mode determines which method accesses the quilt class call or which property will be quilt class. function calls are associated with the function itself, and the relationship between member access and
Serialization is probably the conversion of some variables into the form of a string of bytes, which is easier to transfer and store. Of course, the switch is not what the transport storage, the key is to become a string form can be converted back,
Form processing
PHP provides users with a variety of powerful features that are easy to use. In terms of the processing of forms, PHP can automatically assign values sent by the client form to the corresponding variables, greatly simplifying the
One problem that is often seen on the WebDev site is about file uploads. In this article I will explain how to implement files in PHP
Upload. Design Upload Form
Our main goal is to complete the file from the local computer upload to the server up.
encoding conversion between gb2312 and UnicodeThe following example is to convert gb2312 to "whole" in this formphp4.3.1 later Iconv function is very useful, just need to write a uft8 to Unicode conversion functionTabular (gb2312.txt) is fine.
Generally we will write this:
Copy Code code as follows:
?
if ($_get[' time ']==null)
{
$time = time ();
}
Else
{
$time = $_get[' time '];
}
Echo $time;
If get has time this value is brought in variable times, and
Require '.. /inc/conn.php ';
?>
Initial parameter settings
$pagesize = 5; Paging size
$pagenum = 1; Default to First page
First step: Get the current page
if ($_get) {
if ($_get[' Pagenum ']) {
$pagenum =$_get[' Pagenum '];
}
}
Step two: Get the
Copy Code code as follows:
/* function Array_map () function: Most group callback functions---the function of a callback function to a cell of a given array
* 1, Syntax: Array Array_map (callback callback, array arr1 [, array ...])
* 2,
Copy Code code as follows:
function Array_add ($a, $b) {
Gets the intersection of two arrays based on the key name
$arr =array_intersect_key ($a, $b);
Iterate through the second array, if the key name does not exist with the first array, add
Copy Code code as follows:
/* Function Definition:
* 1. function is a named
* 2. Separate Code Snippets
* 3. Function to perform a specific task
* 4. And can return a value to the program that calls it
*
* Advantages of the function:
* 1
Copy Code code as follows:
/* Traversal of arrays
*
* 1. Looping through an array using a For statement
* 1. Other languages (only this one way)
* 2.PHP in this way is not the preferred way
* 3. The array must be an indexed array, and the
The second of the PHP learning notes
1. Array
The PHP array is actually an associative array, or a hash table. PHP does not need to declare the size of an array in advance, and you can create an array in a way that is directly assignable. For
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