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

phpÎļþµ÷ÓÃjsÎļþÀïµÄ·½·¨£¿ - PHP / »ù´¡±à³Ì

¼±Çó£ºÔÚphp½Å±¾ÀïÔõôµ÷ÓÃjsÎļþÀï·½·¨£¿
»òÕßÔÚjsÎļþÀïµ÷ÓÃphpÎļþдµÄseesion£¿
PHP¸ÕÈëÃÅѧϰ,ÓÑÇ鶥һ¸ö


¼±Çó£ºÔÚphp½Å±¾ÀïÔõôµ÷ÓÃjsÎļþÀï·½·¨£¿
//echo '<script>alert("ok");</script>';


»òÕßÔÚjsÎļþÀïµ÷ÓÃphpÎļþдµÄseesion£¿
//AJAX¿ÉÒÔ×öµ½¡£

ÒýÓÃ
¼±Çó£ºÔÚphp½Å±¾ÀïÔõôµ÷ÓÃjsÎļþÀï·½·¨£¿
//echo '<script>alert("ok");</script>';


»òÕßÔÚjsÎļþÀïµ÷ÓÃphpÎļþдµÄseesion£¿
//AJAX¿ÉÒÔ×öµ½¡£
+

Õâ¸öÎÊÌâÓеãÄ£ºý¡£¡£

ÒýÓÃ
phpµ÷ÓÃjs£º
Èç echo '<script language="javascript">alert(1);</script>';


ÎÒÏÖÔÚÊÇÏ뽫Õâ¸öjsÎļþÀï±ßµÄÒ»¸ö·½·¨µ÷³öÀ´ÓÃ

Õâ¸öÊÇÎÒдµÄphp½Å±¾£¬²»¶ÔµÄµØ·½¸÷λ°ïæÐÞ¸ÄÒ»ÏÂ

<?php session_start();
$session=$_SESSION["value"];
$js='<script language="javascript" src="js.js"></script>';
$js->YZmaTest($session)?>

²»¿ÉÒÔ$jsÊÇ×Ö·û´®£¬ÄãÓÃ×ó¶ÔÏóÊDz»ÐеÄ


ÒýÓÃ
¼±Çó£ºÔÚphp½Å±¾ÀïÔõôµ÷ÓÃjsÎļþÀï·½·¨£¿
//echo '<script>alert("ok");</script>';


»òÕßÔÚjsÎļþÀïµ÷ÓÃphpÎļþдµÄseesion£¿
//AJAX¿ÉÒÔ×öµ½¡£


µÚÒ»¸öÎÊÌâÎÒ½âÊÍÏÂ
ÎÊÌâÊ


Ïà¹ØÎÊ´ð£º

phpÎļþÄÜ·ñ±»±ðÈ˵ÁÈ¡?? - PHP / »ù´¡±à³Ì

ÎÒ¸ÕѧϰphpÇëÎÊ£¬Èç¹ûÎÒ°ÑphpÎļþÉÏ´«ÖÁ·þÎñÆ÷ºó£¬ÀýÈçhttp://www.****.com/cast.phpÕâ¸öÎļþ»á²»»á±»±ðÈËÏÂÔØ»ò¸´ÖÆ°¢£¿
¿ÉÒÔ±»ÏÂÔØ£¬Ò²¿ÉÒÔ²»±»ÏÂÔØ£¬¿´web·þÎñÆ÷¶Ô¸ÃÎļþȨÏÞµÄÅäÖÃ

¿´Äã¶ÔÎļþȨÏÞµÄÉèÖÃ
......

ÎÊÒ»¸öPHPºÍsmartyµÄÈÕÆÚÎÊÌâ - PHP / »ù´¡±à³Ì

index.phpÄÚÈÝ£º
  $smarty->assign('name',strtotime('-0'));
  $smarty->display("index.html");
index.htmlÄÚÈÝ£º
{$name|date_format:'%Y-%m-%d'}<hr>
{$ ......

php ¹ØÓÚsession_startµÄÎÊÌâ - PHP / »ù´¡±à³Ì

Çë½Ì¸ßÊÖ°ï棬session_start£¨£©·ÅÔÚÍⲿµÄÎļþÓà require »ò include °üº¬½øÀ´£¬ÇëÎÊÕâÑù×öºÏÀíÂ𣿣¿´úÂëÔËÐÐÊÇÕý³£µÄ£¬ÕâÑù×öºÏÀíÂ𣿣¿Çë¸ßÊÖÖ¸µã¡£¡£¡£¡£ лл····
require »ò include ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ