This article focuses on the Windows PHP environment, and the Linux system is not in the scope of discussion.
For security reasons, the server does not allow PHP or other languages to execute the EXEC command. When you have special requirements
Call_user_func_array
(PHP 4> = 4.0.4, PHP 5)
Call_user_func_array -- call a User Function Given with an array of parametersDescriptionMixed call_user_func_array (callback function, array param_arr)
Call a user defined function given by
Click the Mind Map to view the big picture.IntroductionI will write down my favorite and interesting topics and share them with you. The last time I wrote an article "talking with the boss in php". I still have many questions. This book has helped
When a SESSION is enabled, a cookie (called PHPSESSID, which can be obtained through session_name () that uniquely identifies session_id in the browser is first sent. in the case of save_handler = files, a file without a suffix is generated under
Today we have handled a very small problem.
This is the requirement. From Monday to Sunday, only data from last Monday to last Sunday can be seen.
Here we can query the range directly from the Database Based on the date field.
However, PHP needs to
When we use CURL to post data, we need to set post data.
Curl_setopt ($ c, CURLOPT_POSTFIELDS, $ post_data );
Assume that $ data isCopy codeThe Code is as follows: $ data = array ('Name' => 'scofield ','Time' => '2014-2-3')
Next, you need to
1. No matter what program, function name () {}, (){},.... There are too many things to be done.
2. $ str {4} after the variable of the string is treated as an array like the variable.
Iii. {$ val} at this time, braces are used to tell PHP that the
1./ckeditor/config. js, configuration file. If you do not want to write too much, you can directly write the default configuration (language, menu bar, width). You can configure it in Baidu config if necessary.
Config. language = 'en'; config.
Hackers can gain access to the website database through SQL injection attacks, and then they can obtain all the data in the website database, malicious hackers can use SQL injection to tamper with the data in the database and even destroy the data
Copy codeThe Code is as follows: /*
* Getting started with php through FireWire!
* Php has become the preferred development language for mainstream web developers in China. Its powerful object-oriented language makes it easy for beginners to find
1. Use HTTP header information
That is, use the php header function. The HEADER function in PHP is used to send control commands that should have been specified by the HTTP protocol to the browser through the WEB server. For example, to declare the
The first method is completed using arrays. First, cut the file name into an array, and then find a way to get the last element of the array. The second method is to process strings. Another method is to use the pathinfo () function.
Copy codeThe
Libcurl also supports HTTPS authentication, http post, http put, and FTP upload (this can also be completed through the FTP extension of PHP) HTTP form-based upload, proxy, cookies, user name + password authentication.
Php curl is really quite easy
Go directly to the code!
Copy codeThe Code is as follows: /*
* Insert sorting (one-dimensional array)
* Each time, a data element to be sorted is inserted to an appropriate position in the sorted sequence to make the sequence still orderly until all
To use a class before PHP5, you only need to directly include it using include/require.
Test. class. php
Copy codeThe Code is as follows: Class abc {
Function _ construct ()
{
Echo 'www .hzhuti.com;
}
}
?>
Load. phpThe Code is as follows:Copy
First, ajax was unable to upload files, which misled me for a while. If I couldn't sleep tonight, I followed the instructions to upload a new file without refreshing.
In fact, the principle is very simpleCopy codeThe Code is as follows:
Compared
Copy codeThe Code is as follows: /****** Back up the database structure ******/
/*
Function Name: table2sql ()
Function: converts the table structure to SQL
Function parameter: $ table: name of the table to be extracted
Return Value: return the
I have written a registry class before, but that one cannot register multiple classes. The classes are stored using arrays below.
Copy codeThe Code is as follows: // Basic class
Class webSite {// a very simple basic class
Private $ siteName;
Private
Several PHP vulnerabilities that need attention
Several important php. ini options
Register Globals
Php> = 4.2.0, php. the default value of the register_globals option of ini is Off. When register_globals is set to On, the program can receive
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