PHP CookieÓëSession¿çÓò·ÃÎÊ¡¢´«µÝ
ÍíÉÏÌØÒ⻨Á˸öʱ¼ä£¬×Ô¼º¶¯ÊÖÊÔÁËÏ¡£
ÔÚÏîÄ¿ÖÐÒ»Ö±Åöµ½Cookie¿çÓò·ÃÎʼ°SessionId¿çÓò´«µÝÎÊÌâ
·¶Àý£º
index.php
<?php
include_once('a.php');
session_start();
$_SESSION['k'] = uniqid();
setcookie("sess", session_id(), time()+3600, "/", ".ipggg.com");
echo "index.php<br />\n";
echo $_SESSION['k'].'<br />';
echo "<mce:script src="http://www.ipggg.com/test/b.php" mce_src="http://www.ipggg.com/test/b.php"></mce:script>";
var_dump($_COOKIE);
echo "<br />\n";
?>
a.php
<?php
header('Content-type: text/html; charset=utf8');
/*
ÎÒ×¢Ê͵ôP3P»¹ÊÇ¿ÉÒÔ£¬ÄѵÀÊÇÒòΪÎÒRPÌ«¸ß£¿£¡
ÓÃIE7»òÕß»ðºü¶¼¿ÉÒÔ·ÃÎʵ½Öµ£»
ʹÓû·¾³Vista home + xampp-win32-1.7.1Ì××°
*/
//header('P3P: CP="CURa ADMa DEVa PSAo PSDo OUR BUS UNI PUR INT DEM STA PRE COM NAV OTC NOI DSP COR"');
/* memory_limitÊÇÉèÖÃPHPʹÓÃÄÚ´æÊ±¿Õ¼ä£¬Ò»°ãÉèÖÃΪÄÚ´æµÄËÄ·ÖÖ®Ò»£¬Ó¦¸Ã¾Í²é²»¶àÁË¡£ */
@ini_set('memory_limit', '64M');
/* Ö¸¶¨»á»°Ä£¿éÊÇ·ñÔÚÇëÇó¿ªÊ¼Ê±×Ô¶¯Æô¶¯Ò»¸ö»á»°¡£Ä¬ÈÏΪ 0£¨²»Æô¶¯£©¡£ */
@ini_set('session.auto_start', 0);
/* ÒÔ·ÖÖÓÊýÖ¸¶¨»º³åµÄ»á»°Ò³ÃæµÄ´æ»îÆÚ£¬´ËÉ趨¶Ô nocache »º³å¿ØÖÆ·½·¨ÎÞЧ¡£Ä¬ÈÏΪ180 */
@ini_set('session.cache_expire', 180);
/* Ö¸¶¨ÊÇ·ñÆôÓÃ͸Ã÷ SID Ö§³Ö¡£Ä¬ÈÏΪ 0£¨½ûÓã©¡£
°üº¬×ŻỰÃûÒÔ¼°»á»° ID µÄ³£Á¿£¬¸ñʽΪ "name=ID"£¬»òÕßÈç¹û»á»° ID ÒѾÔÚÊʵ±µÄ»á»° cookie ÖÐÉ趨ʱÔòΪ¿Õ×Ö·û´®¡£ */
@ini_set('session.use_trans_sid', 0);
/* Ö¸¶¨ÊÇ·ñÔÚ¿Í»§¶ËÓà cookie À´´æ·Å»á»° ID¡£Ä¬ÈÏΪ 1£¨ÆôÓã©¡£ */
@ini_set('session.use_cookies', 0);
/* ±êÖ¾×Å×÷Ϊ·ÃÎʵÄCookieÖ»ÄÜͨ¹ýHTTPÐÒé¡£²»¹ýʹÓÃAJAXÓÃPHP·ÃÎʾͿɣ¬´¿JavaScriptÎÞЧ£¡Ö»ÄÜ·À·¶Ò»µãµã£¬¶øÇÒ²»ÊÇËùÓÐä¯ÀÀÆ÷¶¼Ö§³Ö¡£ */
@ini_set("session.cookie_httponly", 1);
/* Õâ¸öÓ¦¸Ã²»Óöà˵£¬PHP´íÎó¿ª¹Ø */
@ini_set('display_errors', 1);
?>
b.php
<?php
include_once('a.php');
session_id($_COOKIE['sess']);
session_start();
setcookie("test", $_SESSION['k'], time()+3600, "/", ".ipggg.com");
?>
ÉèÖÃC:\WINDOWS\system32\drivers\etc\hosts
ÒýÓÃ
127.0.0.1 
Ïà¹ØÎĵµ£º
Ò»¡¢ ¿ª·¢³ÉÔ±
a)ÏîÄ¿Ö÷¹Ü
b)Ò³ÃæÃÀ¹¤
c)Ò³Ãæ¿ª·¢
d)·þÎñ¶Ë³ÌÐò¿ª·¢
e)ϵͳÓëÊý¾Ý¹ÜÀí
f)²âÊÔÓë°æ±¾¿ØÖÆ
¶þ¡¢ ÍøÕ¾×鿪·¢¼òÃ÷Á÷³Ì
Èý¡¢ ¿ª·¢¹¤¾ßÓë»·¾³
a) ·þÎñÆ÷ÅäÖÃ
i. WEB·þÎñÆ÷£º FreeBSD6.1+Apache2.0+PHP5.0£¬SVN°æ±¾¿ØÖÆ·þÎñ(½ö²âÊÔ»ú)¡£
ii. Êý¾Ý¿â·þÎñÆ÷£º WIN2003 server+SQL server 2000 ......
Õâ¸öÎĵµ¼òµ¥½éÉÜÁËÔõôʹÓÃC++ΪPHP±àдһ¸öÀ©Õ¹Ä£¿é¡£ÎÒÒѾ±»Îʼ°Õâ¸öÎÊÌâÎÞÊý´ÎÁË£¬ËùÒÔÎÒ¾ö¶¨ÎªºóÀ´Õßдһ¸ö¼òµ¥µÄHOWTO¡£ÕâÆªÎÄÕÂÖ»»á˵Ã÷һЩҪµãºÍ¹Ø¼üÖ®´¦£¬Èç¹ûÄãÏ£ÍûѧϰC++»òPHP£¬Çë²éÔÄÆäËüµÄÎĵµ¡£
˳±ã£¬ÔÚ±¾ÎÄÖÐÎÒÃÇÒ²»á¿´Ò»ÏÂÔÚPHP5ÖÐÔõô°ÑC++ÀàÓ°Éäµ½PHPÖС£ÎÄÕÂÖеÄÀý×Ó¿ÉÒÔÔÚPHP4ºÍPHP5µÄ»·¾³ÏÂÊ¹Ó ......
TIOBEÊÀ½ç±à³ÌÓïÑÔÅÅÐаñÕ¹ÏÖÁ˱à³ÌÓïÑÔµÄÁ÷ÐÐÇ÷ÊÆ¡£Ã¿¸öÔ£¬¶¼ÓÐ×îеÄÊý¾Ý±»¸üС£Õâ·ÝÅÅÐаñµÄÊý¾ÝÈ¡ÑùÀ´Ô´ÓÚ»¥ÁªÍøÉϸ»ÓоÑéµÄ³ÌÐòÔ±¡¢ÉÌ ÒµÓ¦Óá¢ÖøÃûµÄËÑË÷ÒýÇæ£¨ÖîÈç¹È¸è¡¢ MSN ¡¢ÑÅ»¢£©µÄ¹Ø¼ü×ÖÅÅÃû¡¢ Alexa ÉϵÄÅÅÃûµÈ¡£Çë×¢ÒâÕâ¸öÅÅÐаñÖ»ÊÇ·´Ó³ÁËij¸ö±à³ÌÓïÑÔµÄÈÈÃÅ³Ì¶È , Õâ²¢²»´ú±íËüÊÇÒ»¸ö×îºÃµÄ±à³ÌÓïÑÔ» ......
ÍøÉÏÕÒµ½µÄ£º¹²ÏíÒ»ÏÂ
<?
//¡¾¾¯¸æ¡¿:δ¾Ðí¿ÉÇëÎðËæ±ãÐÞ¸Ä
//-----------------------------------------------------------------------------------
-------
//-----------------------------------------------------------------------------------
-------
//
// ¡¾ÎļþÃû¡¿: c_check.inc
// ¡¾× ......
basename: ·µ»Ø²»º¬Â·¾¶µÄÎļþ×Ö·û´®¡£
chgrp: ¸Ä±äÎļþËùÊôµÄȺ×é¡£
chmod: ¸Ä±äÎļþµÄÊôÐÔ¡£
chown: ¸Ä±äÎļþµÄÓµÓÐÕß¡£
clearstatcache: Çå³ýÎļþ״̬¿ìÈ¡¡£
copy: ¸´ÖÆÎļþ¡£
delete: ÎÞÓõÄÏîÄ¿¡£
dirname: È¡µÃ·¾¶ÖеÄĿ¼Ãû¡£
diskfreespace: È¡µÃĿ¼ËùÔÚµÄÊ£Óà¿ÉÓÿռ䡣
fclose: ¹Ø±ÕÒÑ´ò¿ªµÄ ......