<?php/* cookie-less information stored on the client (cookie) session-address cookie size limit/quantity/other Setcookie ()-Set cookie to generate cookie file on client , can be kept: expiry time; name; Value ... * */setcookie (' name ', ' Lee ', Time () + (7*24*60*60));/* * Read COOKIE * */if (isset ($_cookie[' name ')) {echo $_ cookie[' name '];} / * * Delete COOKIE * * */if (isset ($_cookie["name")) {Setcookie ("name", ""), Setcookie ("name", "Lee", Time ()-1 );} / * * Cookie Usage Restrictions: * 1. Must be set in the HTML file content output {before} ; * 2. The processing of cookies by different browsers (inconsistent); * 3. The limit is on the client. * A browser can create up to [3 0 x]cookie; * Each cookie cannot exceed 4KB; * The total number of cookies that can be set per Web site cannot exceed 20. * * *//* session *//* start {session} with Session_Start (). * *///Create session and read Sessionsession_start (); Echo "<br>"; $_session[' name ']= "Leee"; Echo $_session["name"];//set the session will immediately be able to use/* to determine whether the session exists? *///session_start (); $_session["name"]= "Leee", if (Isset ($_session["name")) {echo $_session["name"];}? >
[PHP] using session Sessions