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 终于能调用我的C# dll 了.
该死的,我对C# COM注册一向不了解, PHP 文档上只给PHP那部分内容,没告诉我怎么弄dll
我还傻兮兮的用 Regsvr32 注册那个c# dll.
背景:
Windows xp sp3 ; apache 2.2.14 ; php 5.2.12 ;
VS2010 beta ;
语言:
PHP5 , C#
C#部分:
创建一个 C# Class Library . (dll) ......
SESSION的使用
SESSION的作用很多,最多用的就是站点内页面间变量传递。在页面开始我们要session_start();
开启SESSION;
然后就可以使用SESSION变量了,比如说要赋值就是:$_SESSION['item']="item1";要得到值就
是$item1=$_SESSION['item'];,很简单吧。这里我们可能会使用到一些函数,比如说判断是不是
某SESSION变 ......
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 operating systems, but most of the steps ought to be valid for all Linux-lik ......