CopyCode The Code is as follows: Class Timer
{
VaR $ time_start;
VaR $ time_end;
Function _ construct (){$ This-> time_start = 0;$ This-> time_end = 0;}
Function timer (){$ This->__ construct ();}
Function start (){List ($ USEC, $ Sec) =
1. Merge Arrays The array_merge () function combines arrays and returns a union array. The obtained array starts with the first input array parameter and is immediately added according to the order in which the following array parameters appear. The
CopyCode The Code is as follows: $ Search = array ("' 'si ", // remove Javascript
"' 'si ", // remove CSS
"'] *?> 'Si ", // remove the HTML Tag
"'] *?> 'Si ", // remove the annotation mark
"'([Rn]) [s] +'", // remove the white space
"'& (Quot | #34);
987mb free mb php space application/meter binding
MB free space, MB capacity, MB traffic, FTP and web upload management files, powerful extend host Management Panel, support for PHP, CGI, five MySQL databases, one free email address can be applied
First:
Create a form in sample6_1.php:
CopyCode The Code is as follows: // display the upload status and Image
// Enctype needs to be defined for file uploading. set target to uploadframe for image display.
Enctype = "multipart/form-Data"
Recommended functions:
First, PHP obtains the URL of the current page: dedecms also uses this
CopyCode The Code is as follows: // obtain the current Script URL
Function getcururl ()
{
If (! Empty ($ _ server ["request_uri"])
{
$ Scriptname = $ _
CopyCode The Code is as follows: Global $ php_self;
// Echo $ php_self;
$ T1 = $ _ post ['textfield1'];
$ T2 = $ _ post ['textfield2'];
$ T3 = $ _ post ['textfield3'];
$ T4 = $ _ post ['textfield4 '];
// Chinese Character -- location code
If ($ T1! =
ISSET (); -- this parameter is suitable for detecting whether this parameter exists.
Definition and scope of action: used to test whether a variable has a value (including 0, FALSE, or an empty string, but cannot be NULL), that is, "http: //
We need to find the DLL file to load. The troubleshooting method is as follows:
Change display_startup_errors = Off in php. ini to display_startup_errors = On.This is to access the php page. The php error prompt dialog box will pop up on the server.
Curl_setopt
(PHP 4> = 4.0.2)
Curl_setopt -- set an option for CURL calls
Description
Bool curl_setopt (int ch, string option, mixed value)
The curl_setopt () function sets options for a CURL session. The option parameter is the setting you
Let me explain the use of the global variable to the person at the entry. The global word in the term "global variable" already tells us that this variable can be used everywhere, first look at an instance:
Copy codeThe Code is as follows: $ A = 1;
1. When file_get_contents can be used to replace file, fopen, feof, fgets, and other methods, use file_get_contents as much as possible because of its high efficiency! Note the PHP version of file_get_contents when opening a URL file;
2. Perform as
During PHP development, if you want to introduce a class from the outside, the include and require methods are usually used to include the file defining this class, however, this may cause a large number of include or require method calls in the new
1. Open a file first. Here PHP-> fopen (); function is used.
Definition and usage
The fopen () function opens a file or URL.
If opening fails, this function returns FALSE.
Function prototype:
Fopen (filename, mode, include_path, context)
Http://www.
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