Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB
ÈÈÃűêÇ©£º c c# c++ asp asp.net linux php jsp java vb Python Ruby mysql sql access Sqlite sqlserver delphi javascript Oracle ajax wap mssql html css flash flex dreamweaver xml
 ×îÐÂÎÄÕ : php

phpÖо­³£Óõ½µÄ¼¸¸öÈ¡Õûº¯Êý


¾­³£Óõ½È¡ÕûµÄº¯Êý£¬½ñÌìССµÄ×ܽáһϣ¡ÆäʵºÜ¼òµ¥£¬¾ÍÊǼ¸¸ö
º¯Êý¶øÒÑ¡«¡«Ö÷ÒªÊÇ£ºceil£¬floor£¬round£¬intval
ceil -- ½øÒ»·¨È¡Õû
˵Ã÷
float ceil ( float value )
·µ»Ø²»Ð¡ÓÚ value µÄÏÂÒ»¸öÕûÊý£¬value Èç¹ûÓÐСÊý²¿·ÖÔò½øһλ¡£ceil() ·µ»ØµÄÀàÐÍÈÔÈ»ÊÇ float£¬ÒòΪ float ÖµµÄ·¶Î§Í¨³£±È integer Òª´ó¡£ 
Àý×Ó 1. ceil() Àý×Ó
<?php
echo ceil(4.3);     // 5
echo ceil(9.999);     // 10
?>  
floor -- ÉáÈ¥·¨È¡Õû
˵Ã÷
float floor ( float value )
·µ»Ø²»´óÓÚ value µÄÏÂÒ»¸öÕûÊý£¬½« value µÄСÊý²¿·ÖÉáȥȡÕû¡£floor() ·µ»ØµÄÀàÐÍÈÔÈ»ÊÇ float£¬ÒòΪ float ÖµµÄ·¶Î§Í¨³£±È integer Òª´ó¡£ 
Àý×Ó 1. floor() Àý×Ó
<?php
echo floor(4.3);     // 4
echo floor(9.999); //&nb ......

PHP±à³ÌÖÐÎÊÌ⼯½õ

1. Win32ÏÂapache2ÓÃget·½·¨´«µÝÖÐÎIJÎÊý»á³ö´í
test.php?a=ÄãºÃ&b=ÄãÒ²ºÃ
´«µÝ²ÎÊýÊǻᵼÖÂÒ»¸öÄÚ²¿´íÎó
½â¾ö°ì·¨:"test.php?a=".urlencode(ÄãºÃ)."&b=".urlencode(ÄãÒ²ºÃ)
2. win32ϵÄsession²»ÄÜÕý³£¹¤×÷
php.iniĬÈϵÄsession.save_path = /tmp ÕâÏÔÈ»ÊÇlinuxϵÄÅäÖã¬win32ÏÂphpÎÞ·¨¶ÁдsessionÎļþµ¼ÖÂsessionÎÞ·¨Ê¹Ó㬰ÑËü¸Ä³ÉÒ»¸ö¾ø¶Ô·¾¶¾Í¿ÉÒÔÁË£¬
ÀýÈçsession.save_path = c:\windows\temp
3. includeºÍrequireµÄÇø±ð
Á½
ÕßûÓÐÌ«´óµÄÇø±ð£¬Èç¹ûÒª°üº¬µÄÎļþ²»´æÔÚ£¬
includeÌáʾnotice£¬È»ºó¼ÌÐøÖ´ÐÐÏÂÃæµÄÓï¾ä£¬requireÌáʾÖÂÃü´íÎó²¢ÇÒÍ˳ö£¬¾ÝÎÒ²âÊÔ£¬win32ƽ̨ÏÂËüÃǶ¼ÊÇÏÈ°üº¬ºóÖ´ÐУ¬ËùÒÔ
±»°üº¬ÎļþÀï×îºÃ²»ÒªÔÙÓÐinclude»òrequireÓï¾ä£¬ÕâÑù»áÔì³ÉĿ¼»ìÂÒ¡£
4. isset()ºÍempty()µÄÇø±ð
Á½
Õ߶¼ÊDzâÊÔ±äÁ¿Óõġ£µ«ÊÇ
isset()ÊDzâÊÔ±äÁ¿ÊÇ·ñ±»¸³Öµ£¬¶øempty()ÊDzâÊÔÒ»¸öÒѾ­±»¸³ÖµµÄ±äÁ¿ÊÇ·ñΪ¿Õ¡£Èç¹ûÒ»¸ö±äÁ¿Ã»±»¸³Öµ¾ÍÒýÓÃÔÚphpÀïÊDZ»ÔÊÐíµÄ,µ«»áÓÐ
noticeÌáʾ¡£Èç¹ûÒ»¸ö±äÁ¿±»¸³¿ÕÖµ£¬$foo=""»òÕß$foo=0»òÕß
$foo=false,ÄÇôempty($foo)·µ»ØÕ棬isset($foo)Ò²·µ»ØÕ棬¾ÍÊÇ˵¸³¿ÕÖµ²»»á×¢Ïú ......

PHPÓ¦ÓóÌÐò

      ³ÌÐò¿ª·¢¹ý³ÌÖУ¬Ò»°ãÓõÃ×î¶àµÄµ÷ÊÔ·½·¨¾ÍÊÇÓÃecho¡¢print_r()¡¢var_dump()¡¢printf()µÈ½«Óï¾ä´òÓ¡³öÀ´¡£¶ÔPHP½Å±¾µÄÖ´ÐÐЧÂÊ£¬Í¨³£Êǽű¾Ö´ÐÐʱ¼ä¡£¶ÔÊý¾Ý¿âSQLµÄЧÂÊ£¬Í¨³£ÊÇÊý¾Ý¿âQueryʱ¼ä£¬µ«ÕâÑù²¢²»ÄÜÕæÕý¶¨Î»ºÍ·ÖÎö½Å±¾Ö´ÐкÍÊý¾Ý¿â²éѯµÄÆ¿¾±ËùÔÚ£¿¶Ô´Ë£¬ÓÐÒ»¸ö½ÐXdebug£¨www.xdebug.org
£©µÄPHP³ÌÐòµ÷ÊÔÆ÷(¼´Ò»¸öDebug¹¤¾ß)£¬¿ÉÒÔÓÃÀ´¸ú×Ù£¬µ÷ÊԺͷÖÎöPHP³ÌÐòµÄÔËÐÐ×´¿ö¡£
Ò»¡¢ÒÔwindowsƽ̨¶Ô´ËÄ£¿éµÄ°²×°×ö¼òµ¥µÄ½éÉÜ£º
1. ÏÂÔØPHPµÄXDebugÀ©Õ¹£¬ÍøÖ·£ºhttp://xdebug.org/(Õâ¸ö¸ù¾ÝÄãĿǰʹÓõÄPHP°æ±¾¶ø¶¨)£»
2. ½«ÏÂÔصÄÄ£¿é(php_xdebug-2.0.5-5.2.dll)·Åµ½PHPµÄ°²×°µÄ ext Ŀ¼Ï£»
3. ÅäÖÃphp.iniÎļþ£¬½«ÒÔϼ¸ÐÐÌí¼Ó
**************************************
extension=php_xdebug-2.0.5-5.2.dll
[Xdebug]
xdebug.profiler_enable=on
xdebug.trace_output_dir="E:\Projects\xdebug" #·ÅÖÃXdebugÊä³öµÄÊý¾ÝÎļþµÄĿ¼
xdebug.profiler_output_dir="E:\Projects\xdebug"
********************************************************
4. ÖØÆôApache·þÎñÆ÷¡£Íê³É£¡£¡£¡
5. <?php echo php ......

PHPÄ£¿é»¯°²×°


      PHP£¨Hypertext
Preprocessor£©ÕâÃÅËäÈ»¼òµ¥µ«¹¦ÄÜÈ´ÊǷdz£Ç¿´óµÄ½Å±¾ÓïÑÔ£¬ÏÂÃæ¾Í
»ùÓÚWindowsXP+sp2µÄ²Ù×÷ƽ̨ϵÄ
Apache2.0.53+php5.2.1°²×°¼°»ù±¾ÅäÖùý³Ì¼Ç¼ÏÂÀ´ÒÔ¹©²Î¿¼£º
Ò»¡¢Ê×ÏÈ´Ó¸÷¹Ù·½ÍøÕ¾ÏÂÔØÒÔϳÌÐò£º
1. apache_2.0.53-win32-x86-no_ssl.exe
2. php-5.2.1-Win32.zip £¨¶þ½øÖÆѹËõ°ü£©
¶þ¡¢°²×°¼°ÅäÖùý³Ì£º
1. °²×°apache Web ·þÎñÆ÷£º
Ë«»÷°²×°Îļþapache_2.0.53-win32-x86-no_ssl.exe ½«Æä°²×°ÔÚ D:/ApacheĿ¼Ï£¨±¾ÈËÔÚDÅÌн¨ÁËApacheÎļþ¼Ð£©Ï£¬
-------------------------------------------------------
+ ×¢Ò⣺°²×°¹ý³Ì¿ÉÄÜ»á³öÏÖÒÔÏÂÎÊÌâ:
+ OS 10048ͨ³£Ã¿¸öÌ×½Ó×ÖµØÖ· (ЭÒé/ÍøÂçµØÖ·/¶Ë¿Ú) Ö»ÔÊÐíʹÓÃÒ»´Î:
+ make_sock: could not bind to address 0.0.0.0:80...” Ò»°ãÊÇIISÕ¼ÓÃÁË80¶Ë¿ÚÒýÆðµÄ
+ Á½ÖÖ½â¾ö·½·¨:
+ 1¡¢´ò¿ª ¿ØÖÆÃæ°å->·þÎñ ÕÒµ½ IIS admin µÄ·þÎñ ¹Ø±Õ²¢½ûÓÃ
+ 2¡¢Èç¹û²»Ïë¹Ø±ÕIIS·þÎñ ¿É½«apacheʹÓõĶ˿ڸijÉÆäËü¶Ë¿Ú
+ ½«apache2/conf/httpd.conf ÖеÄListen 80 ¸ÄΪ Listen £¨ÄãҪʹÓõĶ˿ڣ© Èç Listen 8080
+ ²»¹ýÕâʱÔÚÄã·ÃÎÊÄãµÄapache ϵÄWeb·þÎñʱ ......

ÓÃNotepad++´òÔì×îÇ¿µÄPHP¼¯³É¿ª·¢»·¾³

½ñÌìÓÃÁË°ëÌìʱ¼ä£¬ÓÃNotepad++×é×°ÁËÒ»¸ö×ÔÈÏΪ×îÇ¿µÄPHP¼¯³É¿ª·¢»·¾³.
Ö÷Òª¹¦ÄÜÈçÏ£º
ÏîÄ¿¹ÜÀí
Ç¿´óµ÷ÊÔÄÜÁ¦
Ç¿´óµÄ²éÕÒÌæ»»¹¦ÄÜ
¼«Ð¡µÄºÄ·Ñϵͳ×ÊÔ´(×î¶àºÄ·Ñ2MÄÚ´æ)
¼«¿ìµÄÔËÐÐËٶȣ¬¿ÉÒÔÓë¼Çʱ¾ÏàæÇÃÀ
Óï·¨¸ßÁÁ,ÕÛµþ
´úÂë×Ô¶¯Íê³É(º¯Êý£¬±äÁ¿)
Îļþ±È½Ï
´úÂëµ¼³ö
ºê¼ÖÆ,»Ø·Å
Ö§³ÖÆäËûÓïÑÔ(java,c,c++,xmlµÈ)
·½±ãµÄ¸ñʽºÍ±àÂëת»»
SVN°æ±¾¿Í»§¶Ë
ÓëÆäËû¿ª·¢»·¾³¶Ô±ÈÈçÏ£º
 Óŵ㣺
    Ëٶȿ죬ºÄ·Ñ×ÊԴС,Óï·¨¸ßÁÁÀàÐͶà,²éÕÒÌæ»»·½±ã,²å¼þÖ§³Ö
ȱµã£º
   º¯ÊýÁбíδÄÜʵÏÖ,ûÓÐDWµÄweb¿ÉÊÓ»¯±à¼­Æ÷
......

IIS6µÄPHP×î¼ÑÅäÖ÷½·¨

½ÌÄãIIS6µÄPHP×î¼ÑÅäÖ÷½·¨
¡¡¡¡ËäÈ» LAMP ×éºÏºÜ²»´í£¬µ«ÊÇÈç¹ûÏëÒª¼ÜÉèһ̨ͬʱ֧³ÖPHP¡¢ASP¡¢ASP.NET¡¢JSP¡¢PerlµÄWebÐéÄâÖ÷»ú·þÎñÆ÷£¬»¹ÊÇÓàWindows 2003µÄIIS 6×îºÃ¡£ÍøÉÏÓкܶà½éÉÜÔÚIIS 6ÉÏÅäÖÃPHPµÄÎÄÕ£¬µ«ÊÇÄÇЩ·½·¨²»ÊÇÐÔÄܲ»ºÃ£¬¾ÍÊÇÉý¼¶Âé·³¡£ÏÂÃæµÄ·½·¨¿ÉÒÔÈÃÄãÔÚµÚÒ»´ÎÅäÖúúó£¬Äܹ»·Ç³£·½±ãµÄ½øÐÐÉý¼¶¡£ 
¡¡¡¡ÕâÀïËù˵µÄÉý¼¶£¬ÊÇÖ¸´Óij¸öphp4°æ±¾Éý¼¶µ½ÁíÒ»¸öphp4°æ±¾£¬»òÕß´Óij¸öphp5°æ±¾Éý¼¶µ½ÁíÒ»¸öphp5°æ±¾£¬¶ø²»ÊÇÖ¸´Óphp4Éý¼¶µ½php5¡£ 
¡¡¡¡×¼±¸£º 
¡¡¡¡1¡¢Ò»Ì¨°²×°ºÃµÄ Windows 2003 ·þÎñÆ÷£¬²¢ÇÒÒѾ­°²×°ÁË IIS 6¡£ 
¡¡¡¡2¡¢ÏÂÔØ windows °æµÄ PHP ¶þ½øÖÆѹËõ°ü 
¡¡¡¡°²×°£º 
¡¡¡¡½âѹËõ PHP ¶þ½øÖÆѹËõ°üµ½ C:\php Ä¿Â¼Ï£¨ÕâÀï¼ÙÉè C: ÅÌÊÇϵͳÅÌ£¬¼´°²×°ÁËWindows ÏµÍ³µÄÅÌ£¬Èç¹ûϵͳÅÌÊÇ D: ÅÌ£¬Ôò½âѹËõµ½ D:\php Ä¿Â¼Ï£¬ÒÔ´ËÀàÍÆ£¬ÏÂͬ£©¡£ 
¡¡¡¡È»ºó´ò¿ª“ÎҵĵçÄÔ”->“ÊôÐÔ”->“¸ß¼¶”->“»·¾³± ......
×ܼǼÊý:2174; ×ÜÒ³Êý:363; ÿҳ6 Ìõ; Ê×Ò³ ÉÏÒ»Ò³ [354] [355] [356] [357] [358] [359] [360] [361] 362 [363]  ÏÂÒ»Ò³ βҳ
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ