PHP 强制性文件下载功能的函数代码(任意文件格式)

yipeiwu_com6年前
复制代码 代码如下: /******************** *@file - path to file */ function force_download($file) { if...

PHP 创建标签云函数代码

yipeiwu_com6年前
复制代码 代码如下: function getCloud( $data = array(), $minFontSize = 12, $maxFontSize = 30 ) { $mini...

PHP为表单获取的URL 地址预设 http 字符串函数代码

yipeiwu_com6年前
复制代码 代码如下: if (!preg_match("/^(http|ftp):/", $_POST['url'])) { $_POST['url'] = 'http://'.$_PO...

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...