Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

PHP ʵÏÖ¶à·þÎñÆ÷¹²ÏíSESSIONÊý¾Ý

Ò»¡¢ÎÊÌâÆðÔ´
ÉÔ´óһЩµÄÍøÕ¾£¬Í¨³£¶¼»áÓкü¸¸ö·þÎñÆ÷£¬Ã¿¸ö·þÎñÆ÷ÔËÐÐ×Ų»Í¬¹¦ÄܵÄÄ£¿é£¬Ê¹Óò»Í¬µÄ¶þ¼¶ÓòÃû£¬¶øÒ»¸öÕûÌåÐÔÇ¿µÄÍøÕ¾£¬Óû§ÏµÍ³ÊÇͳһµÄ£¬¼´Ò»Ì×
Óû§Ãû¡¢ÃÜÂëÔÚÕû¸öÍøÕ¾µÄ¸÷¸öÄ£¿éÖж¼ÊÇ¿ÉÒԵǼʹÓõġ£¸÷¸ö·þÎñÆ÷¹²ÏíÓû§Êý¾ÝÊDZȽÏÈÝÒ×ʵÏֵģ¬Ö»ÐèÒªÔÚºó¶Ë·Å¸öÊý¾Ý¿â·þÎñÆ÷£¬¸÷¸ö·þÎñÆ÷ͨ¹ýͳһ½Ó
¿Ú¶ÔÓû§Êý¾Ý½øÐзÃÎʼ´¿É¡£µ«»¹´æÔÚÒ»¸öÎÊÌ⣬¾ÍÊÇÓû§ÔÚÕâ¸ö·þÎñÆ÷µÇ¼֮ºó£¬½øÈëÁíÒ»¸ö·þÎñÆ÷µÄ±ðµÄÄ£¿éʱ£¬ÈÔÈ»ÐèÒªÖØеǼ£¬Õâ¾ÍÊÇÒ»´ÎµÇ¼£¬È«²¿Í¨
ÐеÄÎÊÌ⣬ӳÉäµ½¼¼ÊõÉÏ£¬Æäʵ¾ÍÊǸ÷¸ö·þÎñÆ÷Ö®¼äÈçºÎʵÏÖ¹²Ïí SESSION Êý¾ÝµÄÎÊÌâ¡£
¶þ¡¢PHP SESSION µÄ¹¤×÷Ô­Àí
ÔÚ½â¾öÎÊÌâ֮ǰ£¬ÏÈÀ´Á˽âһϠPHP SESSION µÄ¹¤×÷Ô­Àí¡£ÔÚ¿Í»§¶Ë£¨Èçä¯ÀÀÆ÷£©µÇ¼Íøվʱ£¬±»·ÃÎ浀 PHP Ò³Ãæ¿ÉÒÔʹÓÃ
session_start() ´ò¿ª SESSION£¬ÕâÑù¾Í»á²úÉú¿Í»§¶ËµÄΨһ±êʶ SESSION ID£¨´Ë ID ¿Éͨ¹ýº¯Êý
session_id() »ñÈ¡/ÉèÖã©¡£SESSION ID ¿ÉÒÔͨ¹ýÁ½ÖÖ·½Ê½±£ÁôÔÚ¿Í»§¶Ë£¬Ê¹µÃÇëÇó²»Í¬µÄÒ³Ãæʱ£¬PHP ³ÌÐò¿ÉÒÔ»ñÖª¿Í»§¶ËµÄ
SESSION ID£»Ò»ÖÖÊǽ« SESSION ID ×Ô¶¯¼ÓÈëµ½ GET µÄ URL ÖУ¬»òÕß POST µÄ±íµ¥ÖУ¬Ä¬ÈÏÇé¿öÏ£¬±äÁ¿ÃûΪ
PHPSESSID£»ÁíÒ»ÖÖÊÇͨ¹ý COOKIE£¬½« SESSION ID ±£´æÔÚ COOKIE ÖУ¬Ä¬ÈÏÇé¿öÏ£¬Õâ¸ö COOKIE µÄÃû×ÖΪ
PHPSESSID¡£ÕâÀïÎÒÃÇÖ÷ÒªÒÔ COOKIE ·½Ê½½øÐÐ˵Ã÷£¬ÒòΪӦÓñȽϹ㷺¡£
ÄÇô SESSION µÄÊý¾Ý±£´æÔÚÄÄÀïÄØ£¿µ±È»ÊÇÔÚ·þÎñÆ÷¶Ë£¬µ«²»ÊDZ£´æÔÚÄÚ´æÖУ¬¶øÊDZ£´æÔÚÎļþ»òÊý¾Ý¿âÖС£Ä¬ÈÏÇé¿öÏ£¬php.ini ÖÐÉèÖõÄ
SESSION ±£´æ·½Ê½ÊÇ files£¨session.save_handler = files£©£¬¼´Ê¹ÓöÁдÎļþµÄ·½Ê½±£´æ SESSION
Êý¾Ý£¬¶ø SESSION Îļþ±£´æµÄĿ¼ÓÉ session.save_path Ö¸¶¨£¬ÎļþÃûÒÔ sess_ Ϊǰ׺£¬ºó¸ú SESSION
ID£¬È磺sess_c72665af28a8b14c0fe11afe3b59b51b¡£ÎļþÖеÄÊý¾Ý¼´ÊÇÐòÁл¯Ö®ºóµÄ SESSION
Êý¾ÝÁË¡£Èç¹û·ÃÎÊÁ¿´ó£¬¿ÉÄܲúÉúµÄ SESSION Îļþ»á±È½Ï¶à£¬Õâʱ¿ÉÒÔÉèÖ÷ּ¶Ä¿Â¼½øÐÐ SESSION
ÎļþµÄ±£´æ£¬Ð§ÂÊ»áÌá¸ßºÜ¶à£¬ÉèÖ÷½·¨Îª£ºsession.save_path="N;/save_path"£¬N Ϊ·Ö¼¶µÄ¼¶Êý£¬save_path
Ϊ¿ªÊ¼Ä¿Â¼¡£µ±Ð´Èë SESSION Êý¾ÝµÄʱºò£¬PHP »á»ñÈ¡µ½¿Í»§¶ËµÄ SESSION_ID£¬È»ºó¸ù¾ÝÕâ¸ö SESSION ID µ½Ö¸¶¨µÄ
SESSION Îļþ±£´æĿ¼ÖÐÕÒµ½ÏàÓ¦µÄ SESSION Îļþ£¬²»´æÔÚÔò´´½¨Ö®£¬×îºó½«Êý¾ÝÐòÁл¯Ö®ºóдÈëÎļþ¡£¶ÁÈ¡ SESSION
Êý¾ÝÊÇÒ²ÊÇÀàËƵIJÙ×÷Á÷³Ì£¬¶Ô¶Á³öÀ´µÄÊý¾


Ïà¹ØÎĵµ£º

ÅäÖÃPHP»·¾³ÊÖ¼Ç

°²×°»·¾³Îªwindows²Ù×÷ϵͳ£¬ÓÉÓÚÎÒͬʱÐèÒªasp+mssql£¨access£©µÄµ÷ÊÔ»·¾³£¬ËùÒÔ¾ÍÔÚwindowsƽ̨ÏÂÔö¼Óapache+php+mysqlµÄµ÷ÊÔ»·¾³£¬Ë«»·¾³Í¬Ê±´æÔÚ£¬·½±ãÎÒËæʱÇл»¡£
 
    ApacheµÄ°²×°ÓëÅäÖÃ
 
    ´ò¿ªapache¹Ù·½ÍøÕ¾ http://archive.apache.org/dist/httpd/binaries/ ......

ѧϰPHP»¹ÊÇÓÎÏ·¿ª·¢£¿

¡¡¡¡ËµÊµÔڵģ¬ÏÖÔÚµÄweb¿ª·¢È·ÊµºÜ»ð£¬µ«×ܾõµÃ¶ÔÎÒÀ´ËµÃ»ÓÐʲôÎüÒýÁ¦¡£Ëµµ½µ×£¬²»¹ýÊÇ×ö¸öÍøÕ¾ÂÓÐʲôÒâ˼£¿¾ÍËã×ö¸öÌÔ±¦Íø£¬ËãºÜÅ£ÁË°É£¬ÄÇÓÖÔõôÑù£¬²»¹ý¾ÍÊÇʵÏÖһЩ½»»¥²Ù×÷µÄÍøÕ¾°ÕÁË£¬×ܾõµÃ£¬Ã»Óж¯Á¦¡£
¡¡¡¡Æäʵ£¬´ÓÄÚÐÄÉî´¦£¬»¹ÊǾõµÃ×öÓÎÏ·ºÜÓÐÒâ˼¡£ÍæÓÎÏ·¸üÓÐÒâ˼£¬×ö³öƯÁÁµÄÓÎϷЧ¹û²ÅÊǷdz£Ë§µÄ¡£¾¡¹ ......

php jquery ÉÏ´«ÕÕƬ,ÉÏ´«ºóʵʱ±¾Ò³ÃæÔ¤ÀÀ

ÆäʵÕâ¸öµÄÖ÷Òª²¿·Ö²¢²»ÊÇÒ»¸öjquery£¬µ«ÊDZØÐëʹÓõ½
php³ÌÐò²¿·Ö£¬Ò²Ö»ÐèÒªÕâ¸öÒ»¸öphp³ÌÐò¾Í¿ÉÒÔÁË
www.corange.cnÇײâ
<?php
header("Content-Type: text/html; charset=utf-8");
@header( "Cache-Control: no-cache, must-revalidate" );
@header( "Pragma: no-cache" );
@header( "Last-Modified: " ......

PHP£ºÂ·Ôںη½£¿

PHP4:Ææ¼£±³ºó
1995Äêʱ£¬RasmusÔÚÓÃPHPдËûµÄ¸öÈËÖ÷Ò³£»½ñÌ죬PHP³ÉΪ·çÃÒÈ«ÇòµÄ½Å±¾ÓïÑÔ£¬Ô½À´Ô½¶àµÄÕ¾µãÑ¡ÔñʹÓÃPHP£¬Á¬Yahoo¶¼·ÅÆúÁË×Ô¼ºµÄ½Å±¾¶ø¸ÄÓÃPHPÖ§³ÖËüµÄÍøÕ¾¡£¿ÉÒÔ˵£¬PHPÊÇÒ»¸öÆæ¼£¡£ÎÒÒ»Ö±ÈÏΪ£¬ÈκÎÆæ¼£±³ºó¶¼ÓÐËüµÄÔ­Òò¡£ÏÖÔÚ£¬¾ÍÈÃÎÒÃÇ͸¹ýÕâ¸öÆæ¼££¬À´¿´¿´PHPµÄ³É¹¦Ö®µÀ¡£
1 ¼òµ¥Ò×ÓÃ
PHPµÄÈëÃÅÃż÷ ......

ÈçºÎʹÓÃPHP session?

ÔÚÍùPHP SessionÀïÃæ±£´æÐÅϢ֮ǰ£¬ÐèÒªÊ×ÏÈʹÓÃsession_start()º¯ÊýÀ´Æô¶¯session,
Õâ¸öº¯Êý±ØÐëÔÚ<html>±êǩ֮ǰµ÷ÓᣴúÂëÈçÏ£º
<?php session_start(); ?>
<html>
<body>
</body>
</html>
ÔÚSessionÆô¶¯ÒԺ󣬿ÉÒÔʹÓÃPHP $_SESSION±äÁ¿À´»ñÈ¡ºÍÉèÖÃsession±äÁ¿£¬ÊµÀý´ú ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ