- ajax-sel-div.php::AjaxSelDiv
- Select data using ajax div.
Benchmark code running time cost by set marker in code.
- cache.php::Cache
- Base class for key - value like cache system.
- cache-file.php::CacheFile
- K-v cache class using file storage.
- cache-memcached.php::CacheMemcached
- K-v cache class using memcached storage.
Key - value like cache system, data store in filesystem.
A class aimed to use curl function efficiency. Useful for write webgame bot, or an information thief program.
Commucate with server via http using Curl.
Backup db to standard sql files.
Database mantance & update tools.
Dict data management, mostly for db.
(Use ListTable instead) 列表类,以包含表头、分页、数据表格的方式显示各种列表。
Easy write/display doc using Markdown markup language.
eBay API caller class, only a few func done.
Generate excel file, xml mode, need high version of MS Excel.
Basic class of all. Log included.
General table style display html to list data.
Parse a maildir format mail file, got info, especially attachments.
Easy send mail using PHPMailer.
- rv.php::Rv
- Return value class.
- smarty-fl.php::SmartyFl
- Extended Smarty class.
Tools class to generator compative sql parse, Adodb object needed.
Can save html all in 1 file.
Validate form data, include web frontend and php backend.
filename.php is loader for php, return css file content.
Default normal css.
Eric Meyer’s css reset.
- ArrayAdd (&$ar_srce, $key, $val = 1)
- Add value to array by key, if key not exist, init with value.
- ArrayEval ($s_eval, $ar = array())
- Eval string by replace tag with array value by index.
- ArrayInsert (&$ar_srce, $idx, &$ar_ins, $i_pos = 1)
- Insert data to assigned position in srce array by assoc key.
- ArrayRead ($ar, $key, $val_default = null)
- Read value from array.
- ArraySort (&$ar_srce, $key, $b_asc = true, $joker = '')
- Sort array by one of its 2lv keys, and maintain assoc index.
- FilterWildcard ($ar_srce, $rules)
- Filter an array by wildcard rules.
- ClientIpFromHex ($hex)
- Get user ip from hex string.
- ClientIpToHex ($ip)
- Convert user ip to hex string format.
- GetBrowserType ()
- 检查客户端的浏览器是NS还是IE(old)
- GetClientIp ()
- Get ip of client.
GetCfg and SetCfg function.
- GetCfg ($key)
- Return value of config string $cfg.
- LimitServerId ($id)
- Limit program can only run on prefered server.
- SetCfg ($key, $val)
- Set global config with key $key to value $val.
SetCfgDefault ($key, $val) Set default value of global config var $config
- MCryptSmplIvDecrypt/MCryptSmplIvEncrypt (...)
- Use mcrypt to de/encrypt, using a simple way to generate IV.
Date and time func.
- SecToStr ($i_sec, $b_simple = true)
- Convert sec back to str describe.
- StrToSec ($str)
- Convert str to seconds it means.
- Strtotime1 ()
- Remove ':000' before original strtotime().
- DbWrite ($db, $tbl, $data, $pkey)
- 向数据库中写入数据,根据指定的主键或联合主键自动判断是insert还是update。
Download contents as a file.
Smart echo line, end with n or <br /> according running mod
Runtime environment and server env variant.
- ForceHttps ()
- Force page to be visit through https://.
- IsCli ()
- Check if this program is running under cli mod, or is viewing in browser
- NixOs ()
- 判断当前主机是否nix操作系统
Covert escape color to html code
文件系统常用函数。
- BaseName1 ($filename)
- Manual get basename instead of using pathinfo()
- DelFile ($file_or_dir)
- Delete a dir or file completedly
- DirName1 ($filename)
- Manual get dirname instead of using pathinfo()
- DirSize ($path)
- Count size of a directory, recursive
- FileExt1 ($filename)
- Manual get extension instead of using pathinfo()
- FileName1 ($filename)
- Manual get filename instead of using pathinfo()
- FileSize1 ($file)
- Count size of a file
- GetFilenameToWrite ($s_file)
- Get/gen a filename to write as a new file.
- ListDir ($dir)
- List files and file-information of a directory order by mtime asc.
Convert variant byte size to human readable format string.
- IniGet ($filepath, $section = '', $item = '')
- Read ini file, return array of part of the value. Notice to retrieve global value, set $section to ' ' instead of ''.
与 GET 和 POST 参数及 http 请求有关的函数集。
- GetGet ($var, $default)
- Get varient from $_GET
- GetParam ($k = '', $v = '', $b_with_url = false)
- Get and return modified url param.
- GetPost ($var, $default)
- Get varient from $_POST
- GetSelfUrl ()
- Get self url which user visit, including GET parameters.
- GetUrlPlan ($url = '')
- Get http/https from an url or self.
- RegexMatch($preg, $str = '', $csrts = true)
- Match content using preg, return result array or '' if non-match.
常用字符串函数集。
- AddslashesRecursive ($srce)
- Addslashes for any data, recursive.
- JsonEncodeHex ($val)
- Json encode with JSON_HEX_(TAG|AMP|APOS|QUOT) options.
- JsonEncodeUnicode ($val, $option = 0)
- Json encode, simulate JSON_UNESCAPED_UNICODE option is on.
- MatchWildcard ($str, $rule)
- Match a string with rule including wildcard.
- Pin15To18 ($pin)
- Convert 15-digi pin to 18-digi.
- StrToArray ($s_srce, $s_splitter = ',', $b_trim = true, $b_remove_empty = true)
- Convert string to array by splitter.
- SubstrIgnHtml ($str, $len, $marker, $start = 0, $encoding = 'utf-8')
- Get substr by display width, and ignore html tag's length.
处理url字符串,增加或设置/更改URL参数。
Convert string like '_D0_D0_D0' to normal string
- Uuid ($s_cus, $s_cus2)
- Generate an UUID.
- UuidParse ($uuid)
- Get information from an UUID.
- UuidSpeedTest ($num, $file)
- Test how many uuid can this program generate per second.
- ValidateIp ($ip)
- If an ip string given is valid address.
- ValidateEmail ($email)
- Validate an email address.
- JsAlert (msg, title, s_id, b_show_close, b_show_bg)
- Show msg using js/jQuery, with a float div.
通用 JS 函数集。
- GetScrollTop ()
- Get document scrollTop
- GetWindowHeight ()
- Get window height
- ObjLen (obj)
- Simulate object length
- ObjToStr (obj)
- Convert Object to json string, like Array
Cookie 操作 JS 函数集。
Display diff info generate by class Module::DbDiff()
Print area in html, exclude other part.
数据效验 JS 函数集。