PHP Zip压缩 在线对文件进行压缩的函数

yipeiwu_com6年前
复制代码 代码如下: /* creates a compressed zip file */ function create_zip($files = array(),$destinat...

PHP Zip解压 文件在线解压缩的函数代码

yipeiwu_com6年前
复制代码 代码如下: /********************** *@file - path to zip file *@destination - destination dire...

PHP similar_text 字符串的相似性比较函数

yipeiwu_com6年前
PHP 提供了一个极少使用的 similar_text 函数,但此函数非常有用,用于比较两个字符串并返回相似程度的百分比,以下是similar_text () 函数的使用方法: 复制代码...

PHP 日志缩略名的创建函数代码

yipeiwu_com6年前
复制代码 代码如下:function create_slug($string){ $slug=preg_replace('/[^A-Za-z0-9-]+/', '-', $string)...

PHP XML数据解析代码

yipeiwu_com6年前
复制代码 代码如下: //xml string $xml_string="<?xml version='1.0'?> <users> <user id='3...

PHP JSON 数据解析代码

yipeiwu_com6年前
使用此代码可以顺利解析人人连接网站POST获取的数据。 复制代码 代码如下: $json_string='{"id":1,"name":"jb51","email":"admin@jb5...

PHP 删除一个目录及目录下的所有文件的函数代码

yipeiwu_com6年前
复制代码 代码如下: /***** *@dir - Directory to destroy *@virtual[optional]- whether a virtual directo...

PHP 循环列出目录内容的函数代码

yipeiwu_com6年前
复制代码 代码如下: function list_files($dir) { if(is_dir($dir)) { if($handle = opendir($dir)) { while...

PHP 一个随机字符串生成代码

yipeiwu_com6年前
复制代码 代码如下: /************* *@l - length of random string */ function generate_rand($l){ $c= "A...

PHP 可阅读随机字符串代码

yipeiwu_com6年前
复制代码 代码如下: /************** *@length - length of random string (must be a multiple of 2) *****...