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

PHP¼òµ¥¼ÆÊýÆ÷

 <?php
/*ʹÓÃÎı¾Îļþ¼Ç¼Êý¾ÝµÄ¼òµ¥ÊµÏÖ*/
$counter=1;
if(file_exists("mycounter.txt")){
$fp=fopen("mycounter.txt","r");
$counter=fgets($fp,9);
$counter++;
fclose($fp);
}
$fp=fopen("mycounter.txt","w");
fputs($fp,$counter);
fclose($fp);
echo "<h1>ÄúÊǵÚ".$counter."´Î·ÃÎʱ¾Ò³Ã棡<h1>";
?>
<?php
//ÏÂÃæÕâ¸öΪʹÓûùÓÚÊý¾Ý¿âµÄ¼òµ¥¼ÆÊýÆ÷£¬Î´Ìí¼ÓÆäËû·ÀÖ¹Ò»ÈËÖØ¸´Ë¢Ðµķ½·¨¡£½ö¹©²Î¿¼¡£¡£
$conn=mysql_connect("localhost","root","abc");
$result=mysql_query("use db_counter");
$re=mysql_query("select * from tb_counter");
$result=mysql_fetch_row($re);
$counter=$result[0];
echo "ÄúÊǵÚ{$counter}λ·ÃÎÊÕߣ¡";
$counter+=1;echo "<hr>{$counter}";
mysql_query("update tb_counter set counter=$counter");
mysql_close($conn);
?>


Ïà¹ØÎĵµ£º

PHPÓëħÊÞ

ͨ¹ýħÊÞ¿´PHPÉè¼ÆÄ£Ê½
ǰ¶Îʱ¼ä¿´µ½ÓÐÈËÓÃħÊÞÀ´½âÊÍÉè¼ÆÄ£Ê½£¬¸Ð¾õºÜÓÐÒâ˼£¬ÓÚÊÇÎÒ°ÑËü¸ÄÁ˸ģ¬ÓÖÌí¼ÓÁËЩÉè¼ÆÄ£Ê½ÄÚÈÝ£¬½ñÌì·¢³öÀ´¡£ÓÐЩµØ·½½è¼øÁËǰÈ˵ÄÄÚÈÝ£¬Ã»ÓÐ×¢Ã÷£¬ÇëǰÈ˲»Òª¼û¹Ö°¡¡£
ÕâÀïÓôó¼Ò¸ÐÐËȤµÄħÊÞ3À´ÌÖÂÛPHPµÄ¼¸ÖÖ³£¼ûµÄÉè¼ÆÄ£Ê½£ºµ¥¼þģʽ¡¢²ßÂÔģʽ¡¢¹¤³§Ä£Ê½¡¢¹Û²ìÕßģʽ¡£½ñÌì¾Í½²ÕâËĸö°É£¬Ò ......

JQuery´òÔìPHPµÄAJAX±íµ¥ÌύʵÀý

±¾ÊµÀýÖ»ÀûÓõ½JQueryÀà¿â±¾ÉíµÄº¯ÊýºÍ¹¦ÄÜ£¬²»ÐèÒªµÚÈý·½²å¼þµÄÖ§³Ö¡£ÁíÍ⣬ËùÓÐ±íµ¥ÐÅÏ¢¶¼ÊÇÀûÓÃPHPMailerÀà¿âÓʼþµÄÐÎʽ·¢Ë͸ø¹ÜÀíÔ±¡£Èç¹ûÄã¶ÔJQueryµÄ»ù±¾Óï·¨»¹²»ÊǺÜÊìϤ£¬ÇëËÑË÷±¾Õ¾µÄ½Ì³Ì×ÊÔ´¡£Èç¹ûÄã¶ÔPHPMailerÓ÷¨²»ÊìϤ£¬Çë²é¿´±¾Õ¾µÄÁíһƪÎÄÕ¡¶Ê¹ÓÃPHPMailerÀà¿â·¢Ë͵ç×ÓÓʼþ¡·¡£
µÚÒ»²½£¬´´½¨Ò»¸ö±íµ¥HTM ......

09Äê5ÔÂ11ºÅ×îÐÂPHPÃæÊÔÌâ

һѡÔñÌ⣺
1.ÏÂÃæµÄÄǸöÑ¡Ïî¿ÉÒÔ»ñÈ¡±íµ¥Ìá½»µÄÖµ£¿£¨¶àÑ¡£© b d
<form name='frm1' method="post">
<input type="text" name="name" ><input type="submit" name="a">
</form>
A.$_GET['name']
B.$_POST['name']
C.$_SESSION['name']
D.$_REQUEST['name']
E.$_GLOBAL['name']
2.ÍüÀ²¡£ ......

ÓÃphp¹ýÂË±íµ¥Ìá½»ÖеÄΣÏÕhtml´úÂë

ÓÃPHP¹ýÂËÌá½»±íµ¥µÄhtml´úÂëÀï¿ÉÄÜÓб»ÀûÓÃÒýÈëÍⲿΣÏÕÄÚÈݵĴúÂë¡£ÀýÈ磬ÓÐЩʱºòÓû§Ìá½»±íµ¥Öк¬ÓÐhtmlÄÚÈÝ£¬µ«Õâ¿ÉÄÜÔì³ÉÏÔÊ¾Ò³Ãæ²¼¾Ö»ìÂÒ£¬ÐèÒª¹ýÂ˵ô¡£
ÒÔÏÂÊdzÌÐò´úÂ룺
¸´ÖÆ´úÂë
function uhtml($str) 

    $farr = array( 
    ......

php·ÀÖ¹Ò³ÃæË¢Ð´úÂë

 ¿ÉÓÃÓÚphpµÄ¼ÆÊýÆ÷ºÍ±íµ¥µÄÌá½»£¬·ÀÖ¹·´¸´Ë¢Ð¡£
¸´ÖÆ´úÂë
<?php
session_start();
$allow_sep = "30000";
if (isset($_SESSION["post_sep"]))
{
if (time() - $_SESSION["post_sep"] < $allow_sep)
{
exit("Çë²»Òª·´¸´Ë¢ÐÂ");
}
else
{
$_SESSION["post_sep"] = time();
}
}
e ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ