yipeiwu_com6年前
复制代码 代码如下: /* creates a compressed zip file */ function create_zip($files = array(),$destinat...
yipeiwu_com6年前
复制代码 代码如下: /********************** *@file - path to zip file *@destination - destination dire...
yipeiwu_com6年前
PHP 提供了一个极少使用的 similar_text 函数,但此函数非常有用,用于比较两个字符串并返回相似程度的百分比,以下是similar_text () 函数的使用方法: 复制代码...
yipeiwu_com6年前
复制代码 代码如下:function create_slug($string){ $slug=preg_replace('/[^A-Za-z0-9-]+/', '-', $string)...
yipeiwu_com6年前
复制代码 代码如下: //xml string $xml_string="<?xml version='1.0'?> <users> <user id='3...
yipeiwu_com6年前
使用此代码可以顺利解析人人连接网站POST获取的数据。 复制代码 代码如下: $json_string='{"id":1,"name":"jb51","email":"admin@jb5...
yipeiwu_com6年前
复制代码 代码如下: /***** *@dir - Directory to destroy *@virtual[optional]- whether a virtual directo...
yipeiwu_com6年前
复制代码 代码如下: function list_files($dir) { if(is_dir($dir)) { if($handle = opendir($dir)) { while...
yipeiwu_com6年前
复制代码 代码如下: /************* *@l - length of random string */ function generate_rand($l){ $c= "A...
yipeiwu_com6年前
复制代码 代码如下: /************** *@length - length of random string (must be a multiple of 2) *****...