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

php socket ä¯ÀÀÆ÷

<?PHP
/**
* patServer
* PHP socket server base class
* Events that can be handled:
*   * onStart
*   * onConnect
*   * onConnectionRefused
*   * onClose
*   * onShutdown
*   * onReceiveData
*
* @version 1.1
* @author   Stephan Schmidt <schst@php-tools.de>
* @package patServer
*/
class patServer{
/**
* information about the project
* @var array $systemVars
*/
var $systemVars   = array(
    "appName"   => "patServer",
    "appVersion"   => "1.1",
    "author"   => array("Stephan Schmidt <schst@php-tools.de>", )
   );
/**
* port to listen
* @var integer   $port
*/
   var $port   = 63333;
/**
* domain to bind to
* @var string $domain
*/
   var $domain   = "192.168.10.2";
/**
* maximum amount of clients
* @var integer $maxClients
*/
   var $maxClients = -1;
/**
* buffer size for socket_read
* @var integer $readBufferSize
*/
   var $readBufferSize   = 128;
/**
* end character for socket_read
* @var integer $readEndCharacter
*/
   var $readEndCharacter = "\n";
/**
* maximum of backlog in queue
* @var integer $maxQueue
*/
   var $maxQueue = 500;
/**
* debug mode
* @var boolean $debug
*/
   var $debug   = true;
/**
* debug mode
* @var string $debugMode
*/
   var $debugMode = "text";
/**
* debug destination (filename or stdout)
* @var string $debugDest
*/
   var $debugDest = "stdout";
/**
* empty array, used for socket_select
* @var array $null
*/
   var $null   = array();
/**
* all file descriptors are stored here
* @var array $clientFD
*/
   var $clientFD = array();
/**
* needed to store client information
* @var array $clientInfo
*/
&nbs


Ïà¹ØÎĵµ£º

¡¶PHP Óë MySQL Web ¿ª·¢¡·¶ÁÊé±Ê¼Ç £¨Ò»£©

¸ÅÊö
1.PHP ÊÇʲô£¿
   PHP ÊÇ·þÎñÆ÷¶Ë½âÊ͵Ľű¾ÓïÑÔ£¬ËüÊÇĿǰ×îÁ÷ÐÐµÄ web ±à³ÌÓïÑÔÖ®Ò»¡£  ÔÚÒ»¸ö HTML Ò³ÃæÖпÉÒÔǶÈëPHP´úÂ룬ÕâЩ´úÂëÔÚÿ´ÎÒ³Ãæ·ÃÎÊʱִÐС£PHP ´úÂ뽫ÔÚ Web ·þÎñÆ÷Öб»½âÊͲ¢ÇÒÉú³É HTML»òÕß·ÃÎÊÕß¿´µ½ÆäËûÊä³ö½á¹û¡£
2.My SQL ÊÇʲô£¿
   My SQL ÊÇ»ùÓÚ SQL µÄÍê ......

PHP $_SERVER[¡¯PHP_SELF¡¯]

REQUEST_URI ·µ»ØµÄÊǰüÀ¨ºóÃæÊý¾Ý´®µÄµØÖ·£¬Èç index.php?str=1234 PHP_SELF ÊÇ index.php
--------------------------------------------------------------------------------
$_SERVER[’PHP_SELF’]ÔÚ¿ª·¢µÄʱºò³£»áÓõ½£¬Ò»°ãÓÃÀ´ÒýÓõ±Ç°ÍøÒ³µØÖ·£¬²¢ÇÒËüÊÇϵͳ×Ô¶¯Éú³ÉµÄÈ«¾Ö±äÁ¿£¬Ò²»áÓÐʲôÎÊÌâô?È ......

»ù´¡PHPÓ﷨ѧϰ£º³£Á¿£¬±äÁ¿

±¾ÎÄת×Ô http://hi.baidu.com/kxw102/blog/item/f1303188d9c148bb0e2444f2.html£¬¸Ðл×÷ÕߵķÖÏí
ÔÚ
PHP
ÖУ¬»ù±¾Êý¾Ý¿ÉÒÔ·ÖΪ³£Á¿ºÍ±äÁ¿Á½ÖÖ¡£³£Á¿ÃûºÍ±äÁ¿Ãûͨ³£³ÆÎª±êʶ·û¡£(
ÐèҪעÒâµÄÊDZêʶ·û±ØÐëÒÔ×Öĸ»òÕßÏ»®Ïß¿ªÍ·£¬²¢ÇÒÖ»ÄܰüÀ¨×Öĸ¡¢Êý×ÖºÍÏ»®Ïß
)
ÀýÈ磺
my_function¡¢Size¡¢
_BlackµÈµÈ
1.ÏÂÃæËµÏ ......

¸½¼ÓÂë¼°ÆäPHP·½Ê½µÄʵÏÖ

Ò»¡¢¸½¼ÓÂëµÄ×÷Óà    
  ¡¡¡¡±¾ÎÄËùÊöµÄ¸½¼ÓÂë½öÖ¸ÔÚWEBÉÏʹÓõĶàÓÃÓÚÉí·ÝÑéÖ¤µÄ¸½¼ÓÂë¡£  
   
  ¡¡¡¡¸½¼ÓÂëµÄÖ÷Òª×÷ÓÿÉÄÜÊÇ·ÀÖ¹±©Á¦·ÃÎÊ£¬ÀýÈ籩Á¦·½Ê½µÄÃÜÂëÆÆ½âºÍÐÅÏ¢·¢²¼¡£  
   
  ¡¡¡¡¸½¼ÓÂëÔÚÓû§Éí·ÝÑéÖ¤·½ÃæµÄÓ¦ÓÃÄܹ»´ÓÒ»¶¨³Ì¶ÈÉÏ·ÀÖ¹¶ÔÓû ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ