PHP ArrayʵÓú¯Êý²Î¿¼
array_flip
½»»»Êý×éÖеļüºÍÖµ
$arr1 = array('a'=>1,'b'=>2,'c'=>3,'d'=>4);
$array = array_flip($arr1);
showArr($array);
/*
Array
(
[1] => a
[2] => b
[3] => c
[4] => d
)
*/
array_key_exists
¼ì²é¸ø¶¨µÄ¼üÃû»òË÷ÒýÊÇ·ñ´æÔÚÓÚÊý×éÖÐ(Ò²¿ÉÓÃÓÚ¶ÔÏó)
$arr1 = array('a'=>1,'b'=>2,'c'=>3,'d'=>4);
echo array_key_exists('b',$arr1); //1 (true)
array_keys
·µ»ØÊý×éÖÐËùÓеļüÃû
$arr1 = array('a'=>1,'b'=>2,'c'=>3,'d'=>4,5);
$array = array_keys($arr1);
showArr($array);
/*
Array
(
[0] => a
[1] => b
[2] => c
[3] => d
[4] => 0
)
*/
Ïà¹ØÎĵµ£º
PHP
ÊÇÎÒÓùýµÄÓïÑÔÖУ¬×îÁîÈËÄÕ»ðµÄµ«Í¬Ê±Ò²ÊÇ×îÓÐȤµÄÓïÑÔ¡£ÎÒÖ®ËùÒÔ˵“ÁîÈËÄÕ»ð”Ö÷ÒªÊÇÒòΪº¯ÊýÃüÃû¼«Æä²»Ò»Ö¡£¾¡¹ÜÎÒÿÌ춼ҪÓõ½ÕâЩº¯Êý£¬ÎÒ»¹ÊÇÒªÏë
һϓ¾¿¾¹ÊÇ str_pos »¹ÊÇ strpos£¿ÊÇ str_split »¹ÊÇ
strsplit£¿”¡£ÁíÒ»·½Ã棬ÓÐʱºò¿ÉÒÔÓÃÒ»Ðмòµ¥µÄ´úÂë¾ÍÄܽâ¾öÒ»¸öÄÑÌâ¡£
ÏÂÃæ ......
1. PHP¿ÉÔĶÁËæ»ú×Ö·û´®
´Ë´úÂë
½«´´½¨Ò»¸ö¿ÉÔĶÁµÄ×Ö·û´®£¬Ê¹Æä¸ü½Ó½ü´ÊµäÖеĵ¥
´Ê£¬ÊµÓÃÇÒ¾ßÓÐÃÜÂëÑéÖ¤¹¦ÄÜ¡£
/**************
[email=*@length]*@length[/email] - length of random string (must be a
multiple of 2)
**************/
function readable_random_string($length = 6){
$conso= ......
PHP ÖеÄÑ»·Óï¾äÓÃÓÚÖ´ÐÐÏàͬµÄ´úÂë¿éÖ¸¶¨µÄ´ÎÊý¡£
Ñ»·
ÔÚÄú±àд´úÂëʱ£¬Äú¾³£ÐèÒªÈÃÏàͬµÄ´úÂë¿éÔËÐкܶà´Î¡£Äú¿ÉÒÔÔÚ´úÂëÖÐʹÓÃÑ»·Óï¾äÀ´Íê³ÉÕâ¸öÈÎÎñ¡£
ÔÚ PHP ÖУ¬ÎÒÃÇ¿ÉÒÔʹÓÃÏÂÁÐÑ»·Óï¾ä£º
while Ö»ÒªÖ¸¶¨µÄÌõ¼þ³ÉÁ¢£¬ÔòÑ»·Ö´ÐдúÂë¿é do...while Ê×ÏÈÖ´ÐÐÒ»´Î´úÂë¿é£¬È»ºóÔÚÖ¸¶¨µÄÌõ¼þ³ÉÁ¢Ê±Öظ´Õâ¸öÑ» ......
µ±ÏÂÔØÎļþÐèÒªÓë·þÎñ¶Ë½»»¥Ê±£¬¾ÍÐèÒªÓýű¾À´ÊµÏÖ£¬¶ø²»Êǵ¥´¿µØÁ´½Óµ½ÎļþµÄµØÖ·
ÏÂÔØmp3ÎļþµÄÀý×Ó
<?php
$file_path = './data/upload/song/sample.mp3';
$file_name = 'sample.mp3';
$file_size = filesize($file_path);
header ( "Pragma: public" );
header ( "Cache-Control: must-reval ......
Linux + Apache2.0 + Mysql + PHP + phpBB3.0
1.°²°ü£º
Apache2.0
#tar -zxf httpd-***.tar.gz -C /usr/local/src/
#cd /usr/local/src/httpd-***
  ......