phpÈçºÎ»ñÈ¡µ±Ç°Ò³µØÖ·À¸µÄURLµØÖ· - PHP / ¿ªÔ´×ÊÔ´
¾ÍÊÇÎÒÔÚij¸öÍøÒ³²åÈëÁËÒ»¸öphpÁ´½Ó
ÎÒÏë»ñµÃÄǸöÍøÖ·µØÖ·µØÖ·À¸µÄurl¶øÇÒÒªÊä³ötxt¸ñʽ»òÆäËû¸ñʽ¡£Ó¦¸ÃÈçºÎʵÏÖ£¿£¿£¿
»¹ÓоÍÊÇдÈëµ½.txt ÎļþÀÔõôȥÅжÏÊÇ·ñÖظ´¡£
$_sever[request_uri]
Â¥Ö÷¸øµã·Ö£¬1·Ö²»ÉÙ£¬10·Ö²»¶à£¬°Ýл£¡
Â¥Ö÷¸øµã·Ö£¬1·Ö²»ÉÙ£¬10·Ö²»¶à£¬°Ýл£¡
Â¥Ö÷¸øµã·Ö£¬1·Ö²»ÉÙ£¬10·Ö²»¶à£¬°Ýл£¡
Â¥Ö÷¸øµã·Ö£¬1·Ö²»ÉÙ£¬10·Ö²»¶à£¬°Ýл£¡
Â¥Ö÷¸øµã·Ö£¬1·Ö²»ÉÙ£¬10·Ö²»¶à£¬°Ýл£¡
Â¥Ö÷¸øµã·Ö£¬1·Ö²»ÉÙ£¬10·Ö²»¶à£¬°Ýл£¡
fwrite½«×Ö·ûдÈëÖ¸¶¨µÄÎļþ
$file=file_get_contents('a.txt');
echo $file;
$string="aaa";
echo strpos($file, 'a');
if(strpos($file, 'a')) {
echo "ÄãÒª²åÈëµÄ×Ö·û´®ÒѾ´æÔÚ";
}else{
$fp=fopen("a.txt", "w+");
$string=$file.":".$string;
fwrite($fp, $string);
}
$file=file_get_contents('a.txt');
echo $file;
?>
Ïà¹ØÎÊ´ð£º
1.¾«Í¨ÃæÏò¶ÔÏóµÄÉè¼ÆºÍ¿ª·¢£»
2.ÊìÁ·Ê¹ÓÃPHPÓïÑÔ(5.0+)½øÐÐÊý¾Ý¿â£¬ÍøÂçͨÐÅ£¬Îļþ¶Áд£¬°²È«»úÖƵȿª·¢£»
3.ÊìÁ·Ê¹ÓÃMYSQL(5.0+)Êý¾Ý¿â¿ª·¢£¬°üÀ¨»ù±¾µÄÊý¾Ý¿âÉè¼Æ/ÓÅ»¯/°²È«£¬¸´ÔÓµÄT-SQLÓï¾ä±àд£¬ÊìÁ·±àдMYS ......
ÎÒ¸ÕѧϰphpÇëÎÊ£¬Èç¹ûÎÒ°ÑphpÎļþÉÏ´«ÖÁ·þÎñÆ÷ºó£¬ÀýÈçhttp://www.****.com/cast.phpÕâ¸öÎļþ»á²»»á±»±ðÈËÏÂÔØ»ò¸´ÖÆ°¢£¿
¿ÉÒÔ±»ÏÂÔØ£¬Ò²¿ÉÒÔ²»±»ÏÂÔØ£¬¿´web·þÎñÆ÷¶Ô¸ÃÎļþȨÏÞµÄÅäÖÃ
¿´Äã¶ÔÎļþȨÏÞµÄÉèÖÃ
......
PHP code:
$date = '2009-12-25';
$ptn = '/([\d]{4})[- \/](0?[\d]|1[0-2])[-\/ ](0?[\d]|[1-2][\d]|3[0-1])/';
if (preg_match($ptn,$date,$out))
{
print_r($out);exit();
}
½á¹ûΪ:
PHP code:
......
¹ýÍêÄêҪȥÎ人ÁË£¬ÏëÁ˽âÒ»ÏÂPHPÅàѵ±È½ÏÕý¹æ?
Ŷ ¶ÔÁË£¬»¹ÓУ¡PHPÊÖ²á±ØÐëµÃŪһ¸ö
àÅ ÌìÌìÔÚ¿´Ê¥¾£¨Ò»ÌìÒ²¾ÍÖ»ÄÜ¿´¸ö¶þʮҳ£©£¬PHP100ÊÓƵ½Ì³Ì¿´ÁË33½²ÁË£¨Ò»ÌìÒ²Ö»¿´Ò»½²£©
ÎÒ»á¼á³Ö°ÑÕâ±¾ÊéºÍÊÓƵ¸ã¶¨ ......
±±¾©2ÄêPHP¾ÑéÇó¼æÖ°
½Ó·Ö
·¹ý½Ó·Ö£¡.¡£¡£¡£¡£¡£¡£¡£¡£¡£¡£
jf~~~~~~~~~~~~~~Ö§³Ö
ßÀ¡£¡£ÎÒÃÇÐèÒª¼æÖ°£¬¿ÉÊÇÔõôÁªÏµÄãѽ£¿
¶¥¡£¡£¡£ »Ø¸´ÄÚÈÝ »Ø¸´ÄÚÈÝÌ«¶ÌÁË£¡
º¼ÖÝÄãÈ¥²»È¥°¡ ¡£¡£¡£¡£¡ ......