better than the cookie. When the Cookie on the client is disabled or a problem occurs, PHP automatically attaches the session id to the URL, so that the session variable can be used across pages through the session id. However, this attachment also has certain conditions, that is, "session. use_trans_sid = 1 in php. ini or the -- enable-trans-sid option is enabled during compilation ".
Now that we understand the above principles, there are three main ways to discard the cookie session:
1. set
other user information, easy to use. And many friends think that cookies are unsafe (not really) and often disable them. In fact, in the PHP program, we can use the session instead of cookies, it can not depend on whether the client to open cookies.
So, we can put aside cookies using the session, that is, assuming the user closes the cookie in the case of the use of the session, there are several ways to achieve the following:
1. Set the "Session.use_trans_sid = 1" In the php.ini configurat
teethUnion all select 9, n distinctUnion all select 10, n distinctUnion all select 11, nUnion all select 12, n distinctUnion all select 13, n distinctUnion all select 14, nUnion all select 15, n distinctUnion all select 16, n distinctUnion all select 17, n distinctUnion all select 18, n distinctUnion all select 19, n distinctUnion all select 20, n distinctUnion all select 21, n distinctUnion all select 22, n distinctUnion all select 23, n distinctUnion all select 24, n distinctUnion all select
?id.?2, manually through the URL value, hidden form delivery session?id.3, file, database and other forms to save session_id, in the process of cross-page calls manually.Route 1 illustrate:?S1.php?
Session_Start ();?$_session[' var1 ']= "People's Republic of China";?$url = "Next page";?echo? $url;??S2.php?
Session_Start ();?Echo? " The value of the passed SESSION variable var1 is: ". $_session[' var1 '];??Run the above code, in case the client coo
, manually pass the URL value, hide the form passed session ID.3, file, database and other forms to save session_id, in the process of cross-page manual call.
Route 1 illustrates:
s1.php
Session_Start ();$_session[' var1 ']= "People's Republic of China";$url = "Next page";echo $url;?>
s2.php
Session_Start ();echo "passes the value of the SESSION variable var1:". $_session[' var1 ');?>
Running the above code, in case the client cookie is normal
letter of acceptance cannot be used as the basis for trademark naming)Click to download the address of the trademark authorization book
4 naming rules (media name)
1, the media (radio and television, newspapers and periodicals) authentication account name, may use the media organization name, or use the Channel/program/newspaper/periodical name;2, use the Channel/program/newspaper/periodical name, must provide the corresponding license:Radio and television: Need to provide "radio and televisi
is disabled or a problem occurs, PHP automatically attaches the session ID to the URL, so that the session variable can be used across the page with the session ID. But this kind of attachment also has certain condition, namely "SESSION.USE_TRANS_SID = 1 in php.ini" or open at compile time--enable-trans-sid option.
Understand the above reasons, now we have to put aside cookies use session, the main way there are three:
1, set the SESSION.USE_TRANS_SID = 1 in php.ini or compile-time open the--
.2, manually through the URL to pass the value, hide the form pass session ID.3, in the form of files, databases and other forms of saving session_id, in the spread of the process of manual call.The following examples illustrate:In the first case:page1.phpSession_Start ();$_session[' var1 ']= "People's Republic of China";$url = "echo $url;? >page2.phpSession_Start ();echo "passes the session variable var1 value of:". $_session[' var1 '];? >Run the abo
SOLR itself on the Chinese word processing is not too good, so the Chinese application often need to add a Chinese word breaker to Chinese word processing, Ik-analyzer is one of the good Chinese word breaker.
First, version information
SOLR version: 4.7.0
Requires Ik-analyzer version: IK Analyzer 2012ff_hf1
Ik-analyzer Download Address: http://code.google.com/p/ik-analyzer/downloads/list
Second, the configuration steps
Download the compressed Extract folder after extracting the following direc
php. ini or enable the -- enable-trans-sid option when compiling, so that PHP can automatically pass the session id across pages.(Some people say: but during the test, modify php. which method does ini use header ('location: xx. php ') and javascript window. location = xx. php does not achieve the desired effect. Currently, 2. Manually pass session IDs through URL values and hidden forms.3. Save session_id in the form of files and databases, and manually call it during the cross-page process.Th
and hidden forms.
3. save session_id in the form of files and databases, and manually call it during the cross-page process.
Example of Method 1:
S1.php
The code is as follows:
Session_start ();
$ _ SESSION ['var1'] = "People's Republic of China ";
$ Url = "next page ";
Echo $ url;
?>
S2.php
The code is as follows:
Session_start ();
Echo "the value of the passed session variable var1 is:". $ _ SESSION ['var1'];
?>
Run the above code. when
manually call it during the cross-page process.
Here is an example:
S1.php
Session_start ();
$ _ SESSION ['var1'] = "People's Republic of China ";
$ Url = "next page ";
Echo $ url;
?>
S2.php
Session_start ();
Echo "the value of the passed session variable var1 is:". $ _ SESSION ['var1'];
?>
Run the above code. when the client cookie is normal, you can obtain the result "People's Republic of China "
After selecting a date, perform another function of your own onpicked:function () {LoadData ();}"text" class="timeinput FL mr5"Id="Txttime"onclick="Wdatepicker ({maxdate: '%y-%m ', Skin: ' Whygreen ', Readonly:true, datefmt: ' yyyy-mm ', Isshowweek:true, Onpicked:func tion () {loaddata ();}})"Value=""Onblur="This.value = (This.value = = ")? ": This.value"onfocus="This.value = (This.value = = ")? ": This.value">1. Cross-infinite frame displayNo matter where you put the date control, you don't ha
, you will often be prompted to check whether the cookie is open, this is because most of the forum is based on cookies, forum use it to save user name, password and other user information, easy to use. And many friends think that cookies are unsafe (not really) and often disable them. In fact, in the PHP program, we can use the session instead of cookies, it can not depend on whether the client to open cookies.
So, we can put aside cookies using the session, that is, assuming the user closes t
: "session.use_trans_sid in php.ini = 1 or open--enable-trans-sid option at compile time";
Having understood the above, we can draw three ways to solve the problem of cross-page transmission:
1. Set session.use_trans_sid = 1 in php.ini or open the--ENABLE-TRANS-SID option at compile time to have PHP automatically pass the session ID across pages.
(Some people say: But in the test, modify php.ini which way in the page with the header (' location:xx.php ') and JavaScript window.location=xx.php the
session ID.3, file, database and other forms to save session_id, in the process of cross-page manual call.
Route 1 illustrates:
s1.php
Session_Start ();$_session[' var1 ']= "People's Republic of China";$url = "Next page";echo $url;?>
s2.php
Session_Start ();echo "passes the value of the SESSION variable var1:". $_session[' var1 ');?>
Running the above code, in case the client cookie is normal, should be able to get the result "People's
conditions,
One: "Session.use_trans_sid in php.ini = 1 or open--enable-trans-sid option at compile time"; second: the server running PHP must be a unix/linux system and Windows does not have this feature. Having understood the above, we can draw three ways to solve the problem of cross-page transmission:
1. Set session.use_trans_sid = 1 in php.ini or open the--ENABLE-TRANS-SID option at compile time to have PHP automatically pass the session ID across pages.
2, manually pass the URL value
there is a problem, PHP automatically attaches the session ID to the URL, so that the session ID can be used across the page to use the session variable. But this kind of attachment also has certain condition, one: "Session.use_trans_sid in php.ini = 1 or open--enable-trans-sid option at compile time"; second: the server running PHP must be a unix/linux system, Windows does not have this feature.
Having understood the above, we can draw three ways to solve the problem of cross-page transmissio
forms to save session_id, in the process of cross-page manual call.Route 1 illustrates:s1.phpSession_Start ();$_session[' var1 ']= "People's Republic of China";$url = "echo $url;?>s2.phpSession_Start ();echo "passes the value of the SESSION variable var1:". $_session[' var1 ');?>Running the above code, in case the client cookie is normal, should be able to get the result "People's Republic of China".Now yo
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.