One, CGI mode installation security
Second, the Apache module to install security
When PHP is installed as an Apache module, it inherits the privileges of the Apache user (usually "nobody"). This has some impact on security and authentication. For
UTF code
The UTF-8 is to encode the UCS in 8-bit units. The encoding method from UCS-2 to UTF-8 is as follows:
UCS-2 encoding (16-in-system)
UTF-8 byte stream (binary)
0000-007f
0xxxxxxx
0080-07ff
110xxxxx 10xxxxxx
0800-ffff
1110xxxx 10xxxxxx
The workaround is as follows:1, in JS to the Chinese parameters of two times transcoding
Copy Code code as follows:
var login_name = document.getElementById ("LoginName"). Value;
login_name = encodeURI (login_name);
login_name =
The first problem is that there is no standard for keystroke events, according to the specification: the event model that contains input devices such as keyboards will be interpreted later in the DOM specification.
As we have learned, browsers do
Turn from: http://blog.csdn.net/ljb2010_/archive/2010/12/13/6073507.aspx
Coding is often used in AJAX development, especially in Chinese. So what did Encodeuri,encodecomponent do? Why are there encodeURI, and encodeuricomponent?
Knowledge URI
Regular Expression (Regex)
The essence of regular expressions is a string
A regular expression is used to define a matching rule that matches a sequence of strings that conform to a certain syntactic rule.
in development, regular expressions are
First, Json.js
First from the Douglascrockford scheme, should be more people use. Json.js and Json2.js are the same.
Https://raw.github.com/douglascrockford/JSON-js/master/json.js
var meta = {//table of character substitutions ' \b ': ' \\b ', ' t
int get_magic_quotes_gpc (void)
This function obtains the PHP environment set Variable MAGIC_QUOTES_GPC (GPC, Get/post/cookie) value. Return 0 To turn off this feature; return 1 indicates this feature is turned on. When MAGIC_QUOTES_GPC is turned on,
Cookie OverviewIn the previous section, you used an immutable framework to store shopping bar data, and the product display page was constantly changing, although it was not rigorous to achieve a global variable. For example, if you right-click
If you have a bad memory like the author, you may not remember people's names at all. I met people, mostly just nodded, the question "Eat it!" "And expect greetings to end
。 If there is anything else to show, then I have to resort to some cunning
Document.cookie= "userid=828";
If you want to store more than one name/value pair at a time, you can use a semicolon plus a space (; ) separated, for example:
Document.cookie= "userid=828; Username=hulk ";
You cannot use semicolons (;), commas (,),
Escape () method
The MSDN JScript reference says:
The Escape method returns a string value, in Unicode format, that contains the contents of [the argument]. All spaces, punctuation, accented characters, and no other non-ascii characters-are with
Ajax|servlet| Code | problem | show | chinese | garbled
Ajax return Chinese garbled problem solvingUse AJAX to get server data back to the client, the Chinese garbled. Specify codepage=936 in a previous AJAX application, and all page encodings are
Environment: Linux, Apache2, PHP5
Problem: The following error occurred while opening phpmyadmin:
Cannot start session without errors, please check errors given in your PHP and/or webserver log file and configure your PH P installation properly.
javascript| Access We know that cookies are records of users who visit your site, reside on the user's hard disk, and if the user returns to your site again, the cookie will be sent back to your server to help you count and process the repeated
Function descriptionencodeURI () encodes the string as a URIencodeURIComponent () encodes a string as a URI componentEscape () to encode a string
The above is a query from W3school information. So what's the difference between the three, please
Set Cookies
Each cookie is a name/value pair, and you can assign a string such as the following to Document.cookie:
Document.cookie= "userid=828";
If you want to store more than one name/value pair at a time, you can use a semicolon plus a space (
For example, the following PHP code:
Copy Code code as follows:
echo $_get[' key '];
?>
Normal output when URL is http://test.com/c.php?key=999:999
When the URL is http://test.com/c.php?key=9#888, only output: 9
And I want to
When you use GB2312 on some delivery pages and use UTF8 on the receiving page, the parameters you receive may be inconsistent with what you originally received. URLs encoded using the server-side UrlEncode function are not the same as URLs encoded
One, set cookies
Each cookie is a name/value pair, and you can assign a string such as the following to Document.cookie:Document.cookie= "userid=828";If you want to store more than one name/value pair at a time, you can use a semicolon plus a space
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.