PHPдµÄMD5ÆƽâÓë¼ÓÃܳÌÐò
³ÌÐò´úÂë
<!--p
if(isset($_POST['md5'])){ //ÅжÏ$md5ÊÇ·ñÒÑÉèÖã¬Èç¹ûÉèÖÃÁËÔòÖ´ÐÐÒÔÏ´úÂë¡£
if(!is_numeric($_POST['time'])){ //Èç¹ûû»ñÈ¡µ½timeµÄÖµÔò½«timeµÄÖµÉèÖÃΪ30
$_POST['time'] = 30;
}
set_time_limit($_POST['time']); //ÉèÖÃÒ³Ãæ×ִÐÐʱ¼äΪ$time
if(strlen($_POST['md5']) == 32){ //ÅжÏ$md5µÄ³¤¶ÈÊÇ·ñΪ32λ
if($_POST['lx'] == "shuzi"){ //ÅжÏ$lxµÄÖµÊÇ·ñΪshuzi
$i = 0;
//$md5²»µÈÓÚMD5¼ÓÃܺóµÄ$iÇÒ$i²»µÈÓÚ99999999Ôò¼ÌÐøÖ´ÐÐ$i++
while($_POST['md5'] != md5($i) && $i != 99999999){
$i++;
}
}
else
{
//$iÆðʼֵΪaÑ»·md5($i)Èç¹ûµÈÓÚ$md5ÔòÌø³öÒ»Ö±µ½$i²»µÈÓÚzzzzzzzz
for($i = "a"; $i != "zzzzzzzz"; $i++){
if(md5($i) == $_POST['md5']){
break;
}
}
}
if(md5($i) == $_POST['md5']){ //ÅжÏmd5($i)ÊÇ·ñµÈÓÚ$md5£¬Èç¹ûµÈÓÚ¾ÍÖ´ÐÐÒÔÏ´úÂë
echo "<center><font color=red size=3>¹§Ï²Äú!" .$_POST['md5']. "½âÃܳɹ¦À²£¡
ÔÎÄΪ:" .$i. "</font></center>"; //Êä³ö½á¹û..ÎûÎû..
}
}
}
-->
<hr />
<span xxxxx="font-size: small; color: #ff0000;">MD5½âÃÜ</span>
<form action="md5.php" enctype="application/x-www-form-urlencoded" method="post">
×Ö´®:
<input name="md5" size="32" type="text" /> ¾¹ýMD5¼ÓÃܺóµÄ×Ö·û´®.
ʱ¼ä:
<input name="time" size="32" type="text" /> PHP³ÌÐòÖ´ÐеÄʱ¼ä.
ÀàÐÍ:
<select multiple="0" name="lx" size="0"> <option selected="selected" value="zimu">-------------×Öĸ-------------</option> <option value="shuzi">--
Ïà¹ØÎĵµ£º
³õѧPHPµÄʱºò£¬ÎÒÃǾ³£±»PHPµÄ¾ø¶Ô·¾¶ºÍÏà¶Ô·¾¶ÅªµÄÔÎͷתÏò¡£Â·¾¶ÎÊÌâ¾³£µ¼ÖÂinclude¼°requireÃüÁî²»ÄܼÓÔص½Ö¸¶¨µÄÒ³
Ã棬´Ó¶øµ¼ÖÂWeb³ÌÐòÔËÐдíÎó¡£±¾ÎĽ«¸ú´ó¼ÒÒ»Æð̽ÌÖÒ»ÏÂPHP·¾¶ÎÊÌâµÄ³£Óýâ¾ö·½°¸¡£
ÏÂÃæÎÒÃÇÏÈ×öÒ»¸ö¸ö¼òµ¥µÄʾÀý:
ÉÏͼÊÇÒ»¸ö¼òµ¥WebÏîÄ¿µÄ½á¹¹Í¼,ÆäÖи÷ÎļþµÄ´úÂëÈçÏÂ: ......
ÕýÔò±í´ïʽ×Ô¼ºÒ»Ö±²»ÊìϤ£¬Õâ2ÌìÔÚÍøÉÏÒ»Ö±¿´¹ØÓÚËüµÄÎÄÕ£¬×Ô¼º×ܽáÁ˼¸¸öº¯Êý¡£
1£®preg_match()
º¯ÊýÔÐÍ£ºint preg_match (string $pattern, string $content [, array
$matches])
preg_match
()º¯ÊýÔÚ$content×Ö·û´®ÖÐËÑË÷Óë$pattern¸ø³öµÄÕýÔò±í´ïʽÏàÆ¥ÅäµÄÄÚÈÝ¡£Èç¹ûÌṩÁË$matches£¬Ôò½«Æ¥Åä½á¹û·ÅÈëÆäÖС ......
ÎÒÒ²ÊÇÒ»ASPתPHPµÄ³õѧÕߣ¬ÎÒÕâÀïÓÐÒ»ºÃµÄÍøÕ¾ÄÃÀ´Óë´ó¼ÒÒ»Æð·ÖÏí£¬Ï£Íû´ó¼Ò»áϲ»¶£¡
http://www.w3school.com.cn/
Ò²»¹ÓÐһЩºÃµÄÊÓƵҲÄÃÀ´Óë´ó¼ÒÒ»Æð·ÖÏí£¡
http://hi.baidu.com/ylinuxs/blog/item/4433d3354a58fed1a2cc2b26.html ......
ÓÉÓÚ¹«Ë¾ÏîÄ¿µÄÐèÒª£¬×î¾ÔÚÑо¿QuercusÒ»¸ö´¿javaµÄphpÒýÇæ¡£ÏîÄ¿ÕâÁ½¸öÐèÒª×öµÄ¾ÍÊǽ«¸ÃÒýÇæ²Ã¼ô£¬×öÒ»¸öÏà¶Ô°²È«µÄ°æ±¾£¬Ìṩ¸øISVʹÓã¬Í¬Ê±£¬ÔÚÒýÇæÖÐÌṩĬÈϵĽӿڹ©µ÷Óá£ËùÒÔÏÈÑо¿ÁËһϣ¬ÔÚQuercusÒýÇæµÄÖ§³ÖÏ£¬PHPÈçºÎÓëjava¼¯³É¡£
ÒÔÏÂÊÇѧϰµ½µÄ¼¸µã£º
1¡¢Èç¹ûʹÓà Resin-IoC/WebBeansÀ´×éÖ¯Ó¦Óõķþ ......
/ ok
header('HTTP/1.1 200 OK');
//ÉèÖÃÒ»¸ö404Í·:
header('HTTP/1.1 404 Not Found');
//ÉèÖõØÖ·±»ÓÀ¾ÃµÄÖض¨Ïò
header('HTTP/1.1 301 Moved Permanently');
//תµ½Ò»¸öеØÖ·
header('Location: http://www.example.org/'
);
//ÎļþÑÓ³ÙתÏò:
header('Refresh: 10; url=http://www.example.org/');
print 'Y ......