Characteristics:
1, persistent connection. It is not necessary to start and initialize each request quickly.2, is said to allow PHP to execute faster than 3 to 30 times times. The reason for this is that the PHP interpreter is loaded into memory
1.form Label Enctype property.
2.$_files system functions. Converts the uploaded content to an array.
3.move_uploaded_file function. Move the uploaded files stored in the cached folder to the specified folder.
4.is_uploaded_file function. Judge
Let's take a look at how to set up the session in PHP.ini.
Open php.ini to find one of the following in the Session Settings section:
The code is as follows
Copy Code
Session.save_path = "N;/path"Session.save_path = "C:/
Object oriented thought
Object-Oriented programming (Object-oriented Programming,oop) is a programming paradigm, and colleagues are also a method of program development. It encapsulates the program and data as the basic unit of the program to
1, If ... Else loop there are three kinds of structures the first is to use the IF condition as a simple judgment.
Explained as "What to do if something happens".The syntax is as follows: if (expr) {statement} The expr in which the condition is
Recently did the project encountered the issue of equal principal and equal principal and interest, if you do not understand the two ways to look at this point or skip the code directly, this code can also be used for the development of mortgage
Phpstorm+xdebug How to debug local code, the code should be familiar. This article is about how to debug the code for the online server. My PHP environment is lnmp1.2.
Install Xdebug
Executing on the server
PECL Install XdebugThe Xdebug.so module
File read and write operation in PHP
PHP provides a series of I/O functions that simplify the functionality we need, including file system operations and directory operations (such as "Copying [Copy]"). The following is to introduce the basic
Code for the PHP shopping cartPublished by: [Longlong16] Time: [2006-11-1]? if (! $session &&! $scid) { $session = MD5 (Uniqid (rand ()); Setcookie (SCID, $session, Time () + 14400); }/* Last number are expiration time in seconds, 14400 sec = 4 hrs *
General email, form such as zhangshan@163.com,abc@sina.com.cn some commonly used forms on the line, but in our company some customers in the mailbox but there are some zhangshna. Mr@163.com,abc_wang.dd@sian.com,abc_wang.dd.cc@sian.com this similar
How PHP reads files
The file_get_contents () function reads the entire file into a string.
Example
The code is as follows
Copy Code
Echo file_get_contents ("test.txt");?>
Output:
This was a test file with
/*I set the login name and password and session variables such as ... If they are not saved from the next page, a session state variable is not good for everyone, it will be. Because it will return "fake" and redirect to the login page?*/
XML-RPC data types
XML-RPC supports only a limited number of data types. The following are the corresponding relationships to the PHP data types:
Useful Inc.-XML-RPC implementation-PHPXMLRPC
The XML-RPC Toolkit we use is made by Useful, Inc. 's
PHP has many file system-related functions that not only help you open files, but also display directory content and move files. Many even use PHP to write a Web-based file manager.First, you need to remind you about the file path: in Windows, you
Add item to shopping cart The code is as follows:Copy code //// Add_item.php:// Add an item to the shopping cart.//Session_start ();If (session_is_registered ('cart ')){Session_register ('cart ');}Require 'Lib. inc. Php'; // LoadProducts
The code is as follows:Copy code // Function name: CheckEmailAddr ($ C_mailaddr)// Usage: determines whether the email address is a valid email address.// Parameter: $ C_mailaddr (email address to be detected)// Return value: Boolean// Standby
*/ The code is as follows:Copy code Class upfile {// Upload file informationVar $ filename;// Save the nameVar $ savename;// Save pathVar $ savepath;// The file format is limited. If it is null, the format is not limited.Var $ format = "";//
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