PHP¶àÓû§ÔÚÏß¿Í·þϵͳ
PHP¶àÓû§ÔÚÏß¿Í·þϵͳ£¬ºǫ́ÓдúÂëÏâǶµ½ÄãµÄϵͳÖУ¬²»¹ýÕâ¸öÊÇÓ¢Îĵģ¬¸Ð¾õºÜʵÓ㬼ò½à£¬·½±ã£¬ÐèÒªµÄ¿ÉÒÔ×Ô¼ººº»¯£¬²»¾ÍÊǸÄÀïÃæµÄһЩÌáʾÐÅÏ¢ÂµØÖ·ÊÇ£ºhttp://mibew.org/
£¬Õâ¸öÊÇ¿ªÔ´µÄ£¬Ö§³Ö¶àÓû§Í¬Ê±ÔÚÏßÁªÏµ¿Í·þ£¬¿Í·þºǫ́¼°Ê±ÐÔºÜÇ¿£¬Ö»ÒªÓû§µã»÷ÔÚÏß¿Í·þ£¬ºǫ́¾ÍÓÐÌáʾ£¬¶øÇÒ¿ÉÒԲ鿴ÁÄÌì¼Ç¼£¬ºÜ¶àʵÓõÄÉèÖã¬×öÍøÕ¾·þÎñµÄ»òÕßÊÇÆäËûµÄ£¬Èç¹û¶Ô¼°Ê±ÐÔÒªÇóºÜ¸ß£¬ÎÒÏëÕâÊÇ×î¼ÑµÄÑ¡Ôñ£¬¸öÈËʹÓøоõºÜ²»´í£¬ÍƼöʹÓÃ
Ïà¹ØÎĵµ£º
<mce:script language=javascript><!--
var a=0;
// --></mce:script>
<?php
function func1()
{
$t="a=a+1;";
return $t."alert(a)";
}
?>
<?php
echo "<input type=button value='Sure' onclick=\"".func1()."\">";
?> ......
php sessionÅäÖÃ
2009-12-02 09:58
[Session]
; ³ý·ÇʹÓÃsession_register()»ò$_SESSION×¢²áÁËÒ»¸ö±äÁ¿¡£
; ·ñÔò²»¹ÜÊÇ·ñʹÓÃÁËsession_start()£¬¶¼²»»á×Ô¶¯Ìí¼ÓÈκÎsession¼Ç¼¡£
; °üÀ¨resource±äÁ¿»òÓÐÑ»·ÒýÓõĶÔÏó°üº¬Ö¸Ïò×ÔÉíµÄÒýÓõĶÔÏ󣬲»Äܱ£´æÔڻỰÖС£
; register_globalsÖ¸Áî»á ......
PHPÊÇÈõÀàÐÍÓïÑÔ¡£
»ù±¾Êý¾ÝÀàÐÍ£ºinteger¡¢string¡¢boolean¡¢float
¸´ºÏÊý¾ÝÀàÐÍ£ºarray¡¢object
»ù±¾Êý¾ÝÀàÐ;Ͳ»ËµÁË£¬ÏÂÃæ¿´Ò»¸öÊý×éÏà¹ØµÄһЩÀý×Ó¡£
$test1=array(1,2,3,4);//¶¨ÒåÁËÒ»¸ö°üº¬4¸öÊýµÄÊý×é
$test1=array("new1"=>1,"new2"=>2);//Á½¸ö±äÁ¿µÄÊý×é,array['new1']=1,array['new2']=2
¶ ......
PhpÁ¬½ÓmysqlµÄº¯ÊýÈçÏ£º
mysql_connect("Ö÷»úÃû","Óû§Ãû","ÃÜÂë");//´ò¿ªÒ»¸öÁ¬½Ó
mysql_select_db("´ò¿ªÊý¾Ý¿â",Á¬½Ó±êʶ·û);//´ò¿ªÒ»¸öÊý¾Ý¿â
$conn=@mysql_connect("localhost","root","") or die("Á´½Ó´íÎó");ÕâÀï@¿ÉÒÔÒþ²Ø´íÎóÌáʾ,or die¿ÉÒÔÔÚ´íÎóµÄʱºòÏÔʾ¡£
Ö´ÐÐsqlÓï¾äµÄº¯Êý:
mysql_query();
$sql= ......
ÔÚPHP³ÌÐòÉè¼ÆÖУ¬Ëæ»úÊýµÄÉú³ÉÓÈΪÖØÒª¡£ÎÒÃÇÐèÒªÓÃËæ»úÊýÔÚÎÒÃǵÄÒ³ÃæÖÐչʾËæ»ú¼Ç¼£¨±ÈÈçͼƬ¡¢Óû§¼Ç¼¡¢ÎÄÕÂIDµÈ£©¡£ÎÒÃÇ»¹¿ÉÒÔʹÓÃËæ»úÊýÉè¼ÆÈκÎÎÒÃÇÏëÏóµÄ³ÌÐò½á¹¹¡£
Ê×ÏÈÀ´ÈÏʶһÏÂPHPÌṩµÄËæ»úÊýº¯Êýrand()¡£PHPµÄrand()º¯Êý½«·µ»ØËæ»úÕûÊý£¬¾ßÌåʹÓ÷½·¨ÈçÏÂ
rand(min,max)
¿ÉÑ¡²ÎÊýminºÍmax¿ÉÒÔʹrand() · ......