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

PHP×Ö·û´®²Ù×÷ÈëÃÅ

ÎÞÂÛÄÄÖÖÓïÑÔ£¬×Ö·û´®²Ù×÷¶¼ÊÇÒ»¸öÖØÒªµÄ»ù´¡£¬ÍùÍùÊǼòµ¥¶øÖØÒª¡£ÕýÏñÈË˵»°Ò»Ñù£¬Ò»°ãÓÐÐÎÌ壨ͼÐνçÃæ£©£¬ÓÐÓïÑÔ£¨print ×Ö·û´®£¿£©£¬ÏÔÈ»×Ö·û´®ÄܽâÊ͸ü¶àµÄ¶«Î÷¡£PHPÌṩÁË´óÁ¿µÄ×Ö·û´®²Ù×÷º¯Êý£¬¹¦ÄÜÇ¿´ó£¬Ê¹ÓÃÒ²±È½Ï¼òµ¥£¬ÏêϸÇë²Î¿´ http://cn2.php.net/manual/zh/ref.strings.php . ÒÔϽ«¼òµ¥µÄ½²ÊöËüµÄ¹¦ÄܺÍÌØÐÔ¡£
ÈõÀàÐÍ
PHPÊÇÈõÀàÐÍÓïÑÔ£¬ËùÒÔÆäËüÀàÐ͵ÄÊý¾ÝÒ»°ã¿ÉÒÔÖ±½ÓÓ¦ÓÃÓÚ×Ö·û´®²Ù×÷º¯ÊýÀ¶ø×Ô¶¯×ª»»³É×Ö·û´®ÀàÐÍ£¬½øÐд¦Àí£¬Èç:
PHP:  [Copy to clipboard]
echo substr("1234567", 1, 3); 
ºÍ
PHP:  [Copy to clipboard]
echo substr(123456,1, 3); 
ÊÇÒ»ÑùµÄ
¶¨Òå
Ò»°ãÓÃË«ÒýºÅ»òµ¥ÒýºÅ±êʶһ¸ö×Ö·û´®¡£±ÈÈç
PHP:  [Copy to clipboard]
$str = "i love u"; 
$str = 'i love u'; 
ËüÕßÁ½ÕßÊÇÓÐÒ»Ð©Çø±ðµÄ¡£ºóÕß½«Ò»Çе¥ÒýºÅµÄÄÚÈݶ¼»áµ±×÷×Ö·û´¦Àí£»Ç°ÕßÔò²»È»¡£±ÈÈç
PHP:  [Copy to clipboard]
$test = "iwind"; 
$str = "i love $test"; 
$str1 = 'i love $test'; 
echo $str; //½«µÃµ½ i love iwind 
echo $str1; //½«µÃµ½ i love $test 
ͬÑùµÄÒÔÏÂÁ½¸öÀý×ÓµÄÐÐΪҲ²»Ò»ÑùµÄ:
PHP:  [Copy to clipboard]
echo "i love \test"; // ½«µÃµ½ i love est,ÒѾ­½«\tÊÓΪתÒå 
echo 'i love \test'; // ½«µÃµ½ i love \test 
´Ó¶ø¿ÉÒÔ¼òµ¥ÈÏΪ˫ÒýºÅÀïµÄÄÚÈÝÊǾ­¹ý“½âÊÍ”¹ýµÄ£¬µ¥ÒýºÅµÄÊÇ“Ëù¼û¼´ËùµÃ”µÄ¡£ÏÔ¶øÒ×¼û£¬Ë«ÒýºÅÐÎʽµÄ¸üΪÁé»îһЩ£¬µ±È»µ¥ÒýºÅ»áÊÊÓÃÓÚÒ»Ð©ÌØÊâµÄ³¡ºÏ£¬ÕâÀï¾Í²»×÷²ûÊöÁË¡£
Êä³ö
PHPÀïµÄÊä³ö×î³£ÓõÄÊÇecho,print.Á½Õß¶¼²»ÊÇÕæÕýµÄº¯Êý£¬¶øÊÇÓïÑÔ¹¹Ô죬ËùÒÔµ÷ÓÃʱ²»±ØÓÃË«À¨ºÅ£¨±ÈÈçecho("test");print("test")).ÔÚÊä³öµÄʱºòÁ½Õß¶¼¿ÉÒÔʵÏÖ¸³Öµ£º
PHP:  [Copy to clipboard]
echo $str="test"; //Ò»·½ÃæÊä³ötest,Ò»·½Ãæ°Ñ"test"¸³¸ø×Ö·û´®±äÁ¿ $str 
print $str="test"; 
Á½Õß³ýÁËÃû×Ö²»Ò»ÑùÍ⣬»¹ÊÇÓÐÆäËü


Ïà¹ØÎĵµ£º

PHP »ñȡʱ¼ä²»×¼È· ²î8Сʱ µÄ ½â¾ö·½·¨

ÓÃPHP±à³Ì£¬Ê¹Óûñȡʱ¼äµÄ´úÂ룬µ«ÊÇ»ñÈ¡µ½µÄʱ¼ä×ÜÊDZȵ±Ç°Ê±¼äÔç8¸öСʱ£¬°Ù˼²»µÃÆä½â£¬ÔÚÍøÉÏËÑË÷ÁËÏ£¬ÖÕÓÚÕÒµ½Á˽â¾ö°ì·¨£¬Ô­À´ÊÇÊ±ÇøÉèÖÃÎÊÌâ¡£ ½â¾ö°ì·¨Ò»£º ÔÚphp.iniÀïÉèÖà date.timezone = Ê±Çø ½â¾ö°ì·¨¶þ£º ²»ÓÃÐÞ¸Äphp.inÎļþ£¬Ö±½ÓÔÚ»ñȡʱ¼äµÄ´úÂëÇ°Ãæ¼ÓÉÏ£º date_default_timezone_set('Ê±Çø'); ±ÈÈ ......

PHP³£ÓÃÕýÔò±í´ïʽ

    Æ¥ÅäÖÐÎÄ×Ö·ûµÄÕýÔò±í´ïʽ
£º [\u4e00-\u9fa5]
    Æ¥ÅäË«×Ö½Ú×Ö·û(°üÀ¨ºº×ÖÔÚÄÚ)
£º ["\x00-\xff]
    Ó¦Ó㺼ÆËã×Ö·û´®µÄ³¤¶È
£¨Ò»¸öË«×Ö½Ú×Ö·û³¤¶È¼Æ2£¬ASCII×Ö·û¼Æ1£©
    String.prototype.len=function(){return
th ......

php¶ÁÈ¡ºÍ´´½¨wordÎĵµ

×ܽáϱ¾ÈËÔÚÈÕ³£¹¤×÷ÖÐʹÓÃphp²Ù×÷wordµÄһЩʵս¡£
·½·¨Ò»£ºÀûÓÃphp comÄ£¿é
¡£Ò²¼´ÀûÓÃwordÌṩµÄ±¾µØapi£¬ËùÓÐÖ»ÊÊÓÃÓÚwindowsϵͳÉÏ¡£
<?php
$word = new com('word.application') or die('ÎÞ·¨´ò¿ªword');
$word->Visiable = false;
$doc_file = '/path/to/doc';
$word->Open($doc_file);
$text = ' ......

phpѸÀ×µÄÁ´½ÓËã·¨

$thunder = ("Thunder://QUFodHRwOi8vNjAuMTkxLjYwLjEwODo4MDgwL3hweGlhemFpL0RlZXBpbl9HaG9zdF9YUF9WMTguMC5pc29aWg==");
//½âÃÜËü
$thunder = trim($thunder,'Thunder://');
$c_thunder = base64_decode($thunder);
$c_thunder = ltrim(rtrim($c_thunder,'ZZ'),'AA');
//out [url]http://60.191.60.108:8080/xpxi ......

PHPÖÐ$_SERVERµÄÏêϸ²ÎÊýÓë˵Ã÷

PHP±à³ÌÖо­³£ÐèÒªÓõ½Ò»Ð©·þÎñÆ÷µÄһЩ×ÊÁÏ£¬ÌذÑ$_SERVERµÄÏêϸ²ÎÊýÕûÀíÏ£¬·½±ãÒÔºóʹÓá£
$_server ´úÂë
1. $_SERVER['PHP_SELF'] #µ±Ç°ÕýÔÚÖ´Ðнű¾µÄÎļþÃû£¬Óë document rootÏà¹Ø¡£
2. $_SERVER['argv'] # ´«µÝ¸ø¸Ã½Å±¾µÄ²ÎÊý¡£
3. $_SERVER['argc'] # °üº¬´«µÝ¸ø³ÌÐòµÄÃüÁîÐвÎÊýµÄ¸öÊý£¨Èç¹ûÔËÐÐ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ