PHP Cookie and Session analysis
1. PHP Cookies
A cookie is a mechanism for storing data on a remote browser to track and identify users.
PHP sends a cookie in the header of the HTTP protocol, so the Setcookie () function must be called before other
JavaScript window. location object, javascriptwindow
Window. location is often used, and its structure is hard to remember. It can be easily sorted to facilitate future queries.
ExampleURL: http:// B .a.com: 88/index. php? Name = kang & when = 2011 #
It seems meaningless to locate the target data by locating the page number when the data volume increases frequently. I think a mature WEB application for user experience should guide users to use TAG or search functions to find target data. It is a
Php web path retrieval
Class HttpTool
{
/**
* // Obtain the domain name or host address
* # Test URL: http: // localhost: 8081/test/testurl. php? Id = 5
* Returns localhost: 8081.
*/
The PHP file is called on an html static page,
This example describes how to call a PHP file on an html static page. Share it with you for your reference. The specific method is as follows:
The static page does not seem to be able to directly call
Three methods for receiving input parameters in PHP command line scripts
This article mainly introduces three methods for receiving input parameters through PHP Command Line scripts, that is, using PHP scripts like Python scripts, Ruby scripts, and
Instance request test. php web page, ignore the returned value: $. post (test. php); The TIY instance uses the AJAXPOST request to change the text of the div element: $ (input ). keyup (function () {txt $ (input ). val (); $. post (demo_ajax_gethint.
Request-level FilteringAt the request level, we may want to prevent the submission of illegal html tags, such as . Here we can use a php function htmlspecialchars (http://www.php.net/manual/en/function.htmlspecialchars.php) so that all content
About urlencode? & Lt ;? Phpecho & nbsp; & lt; a & nbsp; hrefindex. php? Name. urlencode (Zhang San). & gt; Zhang San & lt; a & gt ;;? & Gt; Why is the connection address still index. php? Name zhang san? Why is this urlencode () not encoded for
Google Reader has a very good Ajax effect, that is, it does not need to flip pages when reading the project. When the browser scroll bar is pulled down to a certain position, a new batch of projects are automatically loaded until all the projects
The data is inserted into the Php?name=%ca%fd%be%dd%bf%e2 "onclick=" Tagshow (event) class= "T_tag" > The database is displayed garbled and from the php?name=%ca%fd%be%dd% Bf%e2 "onclick=" Tagshow (event) class= "T_tag" > Database read the data on
Insert data into php? Name = % CA % FD % BE % DD % BF % E2 "onclick =" tagshow (event) "class =" t_tag "> garbled characters are displayed in the database and in php? Name = % CA % FD % BE % DD % BF % E2 "onclick =" tagshow (event) "class =" t_tag ">
Some people say that jQuery can make js programming very elegant and I have never believed it, because I have always used prototype development.
I learned about jQuery today and it seems that it can really be elegant.
// If you want to publish this
Configuration file operations in php, such as reading and modifying the config. php file. Copy the code as follows :? Php $ nameadmin; kkkk $ bb234; $ db4561321; $ kkkadmin ;? Function definition: get the data value of the configuration file:
How does php inherit the obtained value? // page a & lt; ahref = B. php? Name = Beijing & gt; Shop & lt;/a & gt; // echo $ name =$ _ GET ['name'] on page B; Beijing & lt; ahref = B. php? Name = & lt ;? Php $ name? & Gt; & php: How to inherit the
Access offset injection solves some situations where the column name is injected or not, and the union select is required to support it, and the column name must be sufficient to know the table nameAccess Injection statement:1 Order by *2 a.id,b.id,*
Summary: This article will discuss the concept of polymorphism and its application in object-oriented design, and will also analyze how to use polymorphism in PHP 5 and the advantages and disadvantages of existence.
Support for late binding has
Precautions for passing values in get and post methods in jQuery, jqueryget
As jQuery knows, jQuery's get and post methods have three parameters: Address, data, and callback functions. But we know that the address can also follow the data (such as
PHP Global VariablesSeveral super global variables (superglobals) are predefined in PHP, which means they are available in all scopes of a script. You don't need to specify it, you can use it in functions and classes.PHP Super Global Variables list:
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.