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
Ïà¹ØÎĵµ£º
memcached±¾µØwindowsϵͳ²âÊÔ
ÓõÄÊÇwindowsϵͳ¡£
1.ÏÂÔØMemcache for win32
ÏÂÔØµØÖ·: http://jehiah.cz/projects/memcached-win32/
Ñ¡Ôñmemcached 1.2.1 for Win32 binaries (Dec 23, 2006) ÊÇexeµÄ³ÌÐò
memcached.exe -d install
memcached -d start
2.ÏÂÔØphp_memcache.dll
ÏÂÔØµØÖ·: http://www.wesoho.com/ ......
how to install apache, PHP and MySQL on Linux
This tutorial explains the installation of Apache web server, bundled
with PHP and MySQL server on a Linux machine. The tutorial is primarily for SuSE
9.2, 9.3, 10.0 & 10.1, but most of the steps ought to be valid for all
Linux-like operating ......
REQUEST_URI ·µ»ØµÄÊǰüÀ¨ºóÃæÊý¾Ý´®µÄµØÖ·£¬Èç index.php?str=1234 PHP_SELF ÊÇ index.php
--------------------------------------------------------------------------------
$_SERVER[’PHP_SELF’]ÔÚ¿ª·¢µÄʱºò³£»áÓõ½£¬Ò»°ãÓÃÀ´ÒýÓõ±Ç°ÍøÒ³µØÖ·£¬²¢ÇÒËüÊÇϵͳ×Ô¶¯Éú³ÉµÄÈ«¾Ö±äÁ¿£¬Ò²»áÓÐʲôÎÊÌâô?È ......
¹ýÄêÁË£¬Ò²ÕÇÁËÒ»ËêÁË£¬¸Ð¾õûÓг¤½ø°¡£¡
°¦£¡
Äêǰ²Î¼ÓÁËÖйúµçÐŵÄÃæÊÔ¡£
¸Ð¾õºÜÒ»°ã£¬Á¬SQLÈ«³ÆÊÇʲô¶¼²»¶®£¬»¹ºÃÒâ˼×Ô³ÆÊìÁ·ÔËÓÃMYSQL£¬°¦£¡
¹ýÍêÄ꣬Ҫ¿ªÊ¼ÎªÊµÏ°¶ø±¼²¨ÁË¡£
ÍøÁú¿´À´ÊÇûϣÍûÁË¡£
Ö»ÄܽøÒ»Ð©±È½ÏÒ»°ãµÄ¹«Ë¾Ñ§Ï°Ñ§Ï°ÁË¡£
´Ó½ñÌ쿪ʼ£¬ÈÏÕæ¿´PHP100µÄ×îм¸¸öÊÓÆµ¡£
¿ªÊ¼Í¨¶ÁDZµÄ³ÌÐò£¬×¢½âÉÏ ......
±¾ÎÄת×Ô http://hi.baidu.com/kxw102/blog/item/f1303188d9c148bb0e2444f2.html£¬¸Ðл×÷ÕߵķÖÏí
ÔÚ
PHP
ÖУ¬»ù±¾Êý¾Ý¿ÉÒÔ·ÖΪ³£Á¿ºÍ±äÁ¿Á½ÖÖ¡£³£Á¿ÃûºÍ±äÁ¿Ãûͨ³£³ÆÎª±êʶ·û¡£(
ÐèҪעÒâµÄÊDZêʶ·û±ØÐëÒÔ×Öĸ»òÕßÏ»®Ïß¿ªÍ·£¬²¢ÇÒÖ»ÄܰüÀ¨×Öĸ¡¢Êý×ÖºÍÏ»®Ïß
)
ÀýÈ磺
my_function¡¢Size¡¢
_BlackµÈµÈ
1.ÏÂÃæËµÏ ......