ÍøÂçѧԺ w3popÉçÇø ÍøÂç×ÊÔ´ ITÐÂÎÅ

w3pop.com :: ÍøÂçѧԺ :: PHP :: PHP Misc

»áÔ±µÇ½

ÕʺÅ

ÃÜÂë

»Ø´ð

¼ÇסÃÜÂë

Íü¼ÇÃÜÂë? ×¢²á

PHP
PHP Libxml
PHP Math
PHP Misc
PHP MySQL
PHP SimpleXML
PHP String
PHP XML
PHP Zip
PHP Mail
ÓÃPHP5µÄDirector..
PHP ×èÖ¹SQL×¢ÈëÊ..
PHP5ÃæÏò¶ÔÏó - »..
PHP5ÃæÏò¶ÔÏó - »..
PHP5ÃæÏò¶ÔÏó - »..
PHP5ÃæÏò¶ÔÏó - »..
PHP5ÃæÏò¶ÔÏó - »..
php5ÃæÏò¶ÔÏó - »..
php5ÃæÏò¶ÔÏó - »..
ÓÃPHP¿ØÖÆÓû§µÄä..
PHP PDO ѧϰ±Ê¼Ç

PHP Misc


×÷Õß:w3pop.com ·­Òë/ÕûÀí:w3pop.com ·¢²¼:2007-04-28 ä¯ÀÀ:4327 :: ::

PHP Miscellaneous Introduction
PHP»ìºÏ[Miscellaneous]º¯Êý½éÉÜ

The misc. functions were only placed here because none of the other categories seemed to fit.
ÎÒÃÇÔÚÕâÀïµ¥¶À½éÉÜmisc. functionsº¯ÊýÊÇÒòΪ²»Ì«ÊʺϰÑËü·ÅÈëÆäËüÕ½ÚÖнéÉÜ¡£


Installation
°²×°

The misc functions are part of the PHP core. There is no installation needed to use these functions.
Miscº¯ÊýÊÇPHPºËÐĵÄÒ»²¿·Ö¡£ËùÒÔ£¬Ö»ÒªÄãÒѾ­°²×°ÁËPHP£¬¾Í²»ÐèÒªÔÙÖØÐ¶ÔËü½øÐа²×°±ã¿ÉÒÔʹÓÃËü


Runtime Configuration
ÔËÐнṹ

The behavior of the misc functions is affected by settings in the php.ini file.
Miscº¯ÊýµÄÊôÐÔͨ¹ýÔÚ“PHP.ini”ÎļþÖÐÉèÖúóÖ´ÐС£

Misc. configuration options:
Misc.¹¹³É×é¼þ£º

Name
Ãû³Æ
Default
ĬÈÏÖµ
Description
ÃèÊö
Changeable
ignore_user_abort "0" FALSE indicates that scripts will be terminated as soon as they try to output something after a client has aborted their connection
False±íʾ£ºÈç¹ûËüÊÔͼÔÚ¿Í»§¶ËÖÕÖ¹Á¬½ÓÒÔºóÈÔÊÔͼÊä³öÐÅÏ¢£¬ÄÇô´Ëʱ½Å±¾½«ÖÕÖ¹ÔËÐÐ
PHP_INI_ALL
highlight.string "#DD0000" Color for highlighting a string in PHP syntax
ÔÚPHPÓï·¨ÖУ¬ËüÊÇÓÃÀ´Ç¿µ÷ij¸ö×Ö·û´®¶øÏÔʾµÄ¸ßÁÁÑÕÉ«
PHP_INI_ALL
highlight.comment "#FF8000" Color for highlighting PHP comments
ÔÚPHPÓï·¨ÖУ¬ËüÊÇÓÃÀ´Ç¿µ÷ij¸öPHP×¢ÊͶøÏÔʾµÄ¸ßÁÁÑÕÉ«
PHP_INI_ALL
highlight.keyword "#007700" Color for syntax highlighting PHP keywords (e.g. parenthesis and semicolon)
ÔÚPHPÓï·¨ÖУ¬ËüÊÇÓÃÀ´Ç¿µ÷ij¸öPHP¼ü£¨»ò¹Ø¼ü´Ê£©[key]¶øÏÔʾµÄ¸ßÁÁÑÕÉ«
PHP_INI_ALL
highlight.bg "#FFFFFF" Color for background
±³¾°ÑÕÉ«
PHP_INI_ALL
highlight.default "#0000BB" Default color for PHP syntax
PHPÓï·¨µÄĬÈÏÏÔʾÑÕÉ«
PHP_INI_ALL
highlight.html "#000000" Color for HTML code
HTML´úÂëµÄÑÕÉ«
PHP_INI_ALL
browscap NULL Name and location of browser-capabilities file (e.g. browscap.ini)
ä¯ÀÀÆ÷ÎļþµÄÃû³ÆµÄµØÖ·£¨ÀýÈ磺browscap.ini£©
PHP_INI_SYSTEM


PHP Misc. Functions
PHP Misc.º¯Êý

PHP: indicates the earliest version of PHP that supports the function.
PHP£º×îÔçÖ§³ÖÕâЩ³£Á¿µÄPHP°æ±¾

Function
º¯Êý
Description
ÃèÊö
PHP
connection_aborted() Checks whether the client has disconnected
¼ì²é¿Í»§¶ËÊÇ·ñ¶ÏÏß
3
connection_status() Returns the current connection status
·µ»Øµ±Ç°µÄÁ¬½Ó״̬
3
connection_timeout() Deprecated in PHP 4.0.5
PHP 4.0.5°æ±¾Öв»Ö§³Ö
3
constant() Returns the value of a constant
·µ»ØÒ»¸ö³£Á¿Öµ
4
define() Defines a constant
¶¨ÒåÒ»¸ö³£Á¿
3
defined() Checks whether a constant exists
¼ì²éij¸ö³£Á¿ÊÇ·ñ´æÔÚ
3
die() Prints a message and exits the current script
Í˳öµ±Ç°½Å±¾³ÌÐò²¢Êä³öÒ»¶ÎÐÅÏ¢
3
eval() Evaluates a string as PHP code
·µ»ØÓëPHP´úÂëÏà¶ÔÓ¦µÄ×Ö·û´®
3
exit() Prints a message and exits the current script
Í˳öµ±Ç°½Å±¾³ÌÐò²¢Êä³öÒ»¶ÎÐÅÏ¢¡£
3
get_browser() Returns the capabilities of the user's browser
²éÕÒÓû§µÄbrowsca.iniÎļþ£¬²¢ÇÒ·µ»ØÓû§ä¯ÀÀÆ÷µÄ»ù±¾ÊôÐÔ
3
highlight_file() Outputs a file with the PHP syntax highlighted
ÔÚÊä³öµÄÎļþÖн«PHPÓï·¨²¿·ÖÓò»Í¬µÄÑÕÉ«ÏÔʾ
4
highlight_string() Outputs a string with the PHP syntax highlighted
ÔÚÊä³öµÄ×Ö·û´®Öн«PHPÓï·¨²¿·ÖÓò»Í¬µÄÑÕÉ«ÏÔʾ
4
ignore_user_abort() Sets whether a remote client can abort the running of a script
ΪԶ³Ì¿Í»§¶ËÊÇ·ñ¿ÉÒÔ·ÅÆúÖ´ÐÐÒ»¸ö½Å±¾³ÌÐòÉèÖÃȨÏÞ
3
pack() Packs data into a binary string
½«Êý¾ÝѹËõ³ÉÒ»¸ö¶þ½øÖÆ×Ö·û´®
3
php_check_syntax() Deprecated in PHP 5.0.5
PHP 5.0.5°æ±¾Öв»Ö§³Ö
5
php_strip_whitespace() Returns the source code of a file with PHP comments and whitespace removed
·µ»Ø²»´ø¿Õ°××Ö·û[whitespace]µÄPHP³ÂÊöÎļþµÄÔ´´úÂë
5
show_source() Alias of highlight_file()
highlight_file()µÄ±ðÃû
4
sleep() Delays code execution for a number of seconds
ÉèÖýű¾ÑÓ³ÙÖ´ÐеÄʱ¼ä£¨µ¥Î»£ºÃ룩
3
time_nanosleep() Delays code execution for a number of seconds and nanoseconds
ÉèÖýű¾ÑÓ³ÙÖ´ÐеÄʱ¼ä£¨µ¥Î»£ºÃë/ºÁ΢Ã루ʮÒÚ·ÖÖ®Ò»Ã룩
5
time_sleep_until() Delays code execution until a specified time
sleep()º¯ÊýµÄ×÷ÓÃÊÇ£ºÉèÖýű¾ÑÓ³ÙÖ´ÐеÄʱ¼ä
5
uniqid() Generates a unique ID
²úÉúÒ»¸ö»ùÓÚϵͳʱ¼äµÄ¶ÀÁ¢ID
3
unpack() Unpacks data from a binary string
½«Êý¾Ý´Ó¶þ½øÖÆÐÎʽ½âѹ»ØÀ´
3
usleep() Delays code execution for a number of microseconds
Ö¸¶¨ÑÓ³ÙÖ´ÐдúÂëµÄʱ¼ä£¨µ¥Î»£ººÁ΢Ãë£ÛÊ®ÒÚ·ÖÖ®Ò»Ãë£Ý£©
3


PHP Misc. Constants
PHP Misc.³£Á¿

PHP: indicates the earliest version of PHP that supports the constant.
PHP£º×îÔçÖ§³ÖÕâЩ³£Á¿µÄPHP°æ±¾

Constant
³£Á¿
Description
ÃèÊö
PHP
PHP°æ±¾
CONNECTION_ABORTED    
CONNECTION_NORMAL    
CONNECTION_TIMEOUT    
__COMPILER_HALT_OFFSET__   5

ÆÀÂÛ (0) All