上一页 1 ··· 29 30 31 32 33 34 35 36 37 ··· 40 下一页
摘要: <?php header("Content-Type:text/html;charset=utf-8"); function msubstr($str, $start = 0, $length, $lenth2, $suffix = true){ //$length 中文截取长度,$lenth2英文 阅读全文
posted @ 2016-02-03 09:18 侠岚之弋痕夕 阅读(233) 评论(0) 推荐(0) 编辑
摘要: 什么是BOM? 在UCS 编码中有一个叫做”ZERO WIDTH NO-BREAK SPACE”的字符,它的编码是FEFF。而FFFE在UCS中是不存在的字符,所以不应该出现在实际传输中。UCS规范建议我们在传输字节流前,先传输字符”ZERO WIDTH NO-BREAK SPACE”。这样如果接收 阅读全文
posted @ 2016-02-03 09:07 侠岚之弋痕夕 阅读(530) 评论(0) 推荐(0) 编辑
摘要: 1、HTML 5中验证码HTML代码如下: <div class="demo"> <h3>1、数字验证码</h3> <p>验证码:<input type="text" class="input" id="code_num" name="code_num" maxlength="4" /> <img 阅读全文
posted @ 2016-02-03 09:02 侠岚之弋痕夕 阅读(250) 评论(0) 推荐(0) 编辑
摘要: <?php header("Content-Type:text/html;charset=utf-8"); function xml2array($filename){ $xml = @simplexml_load_file($filename); //返回数组 if(is_object($xml) 阅读全文
posted @ 2016-02-03 08:59 侠岚之弋痕夕 阅读(191) 评论(0) 推荐(0) 编辑
摘要: 导出excel属性设置 //Include class require_once('Classes/PHPExcel.php'); require_once('Classes/PHPExcel/Writer/Excel2007.php'); $objPHPExcel = new PHPExcel() 阅读全文
posted @ 2016-02-03 08:52 侠岚之弋痕夕 阅读(163) 评论(0) 推荐(0) 编辑
摘要: 修改php上传文件尺寸、响应时间 1.修改php.ini 1、post_max_size 指通过表单POST给PHP的所能接收的最大值,包括表单里的所有值,默认为8M(改为150M),看你自己需要进行改变。 2、首先确认file_uploads = on 是否允许通过HTTP上传文件的开关,默认为O 阅读全文
posted @ 2016-02-02 17:06 侠岚之弋痕夕 阅读(1091) 评论(0) 推荐(0) 编辑
摘要: <?php echo "时间格式1:".date("Y-m-d H:i:s ")."<br>";// 2010-06-12 10:26:31 echo "时间格式2:".date("y-M-D h:i:S ")."<br>";// 10-Jun-Sat 10:43:th echo "月份,英文全名: 阅读全文
posted @ 2016-02-02 16:13 侠岚之弋痕夕 阅读(1968) 评论(0) 推荐(0) 编辑
摘要: 只看结果的话,Select Count(*) 和 Select Count(1) 两着返回结果是一样的。 假如表沒有主键(Primary key), 那么count(1)比count(*)快,如果有主键的話,那主键作为count的条件时候count(主键)最快。 如果你的表只有一个字段的话那coun 阅读全文
posted @ 2016-02-02 15:51 侠岚之弋痕夕 阅读(297) 评论(0) 推荐(0) 编辑
摘要: 一、黑名单过滤 function is_spam($text, $file, $split = ':', $regex = false){ $handle = fopen($file, 'rb'); $contents = fread($handle, filesize($file)); fclos 阅读全文
posted @ 2016-02-02 15:38 侠岚之弋痕夕 阅读(264) 评论(0) 推荐(0) 编辑
摘要: /*HTML安全过滤*/ function _htmtocode($content) { $content = str_replace('%','%‎',$content); $content = str_replace("<", "<", $content); $content = str_rep 阅读全文
posted @ 2016-02-02 13:28 侠岚之弋痕夕 阅读(185) 评论(0) 推荐(0) 编辑
摘要: PHP删除目录及目录下所有文件或删除指定文件 <?php header("content-type:text/html;charset=utf-8"); /** * 删除目录及目录下所有文件或删除指定文件 * @param str $path 待删除目录路径 * @param int $delDir 阅读全文
posted @ 2016-02-01 16:45 侠岚之弋痕夕 阅读(1151) 评论(0) 推荐(0) 编辑
摘要: <?php header("content-type:text/html;charset=utf-8"); set_time_limit(0); $styleImg = file_get_contents("http://www.cusabio.com/statics/css/new.css"); 阅读全文
posted @ 2016-02-01 16:23 侠岚之弋痕夕 阅读(313) 评论(0) 推荐(0) 编辑
摘要: <?php header("content-type:text/html;charset=utf-8"); $memcachehost = '127.0.0.1'; $memcacheport = 11211; $memcachelife = 60; $memcache = new Memcache 阅读全文
posted @ 2016-02-01 15:46 侠岚之弋痕夕 阅读(226) 评论(0) 推荐(0) 编辑
摘要: PHP下memcache模块是一个高效的守护进程,提供用于内存缓存的过程式程序和面向对象的方便的接口,特别是对于设计动态web程序时减少对数据库的访问。memcache也提供用于通信对话(session_handler)的处理。 memcache既可以在linux下使用,也可以在windows系统下 阅读全文
posted @ 2016-02-01 15:35 侠岚之弋痕夕 阅读(261) 评论(0) 推荐(0) 编辑
摘要: 参看地址:http://www.bcty365.com/content-10-2945-1.html 阅读全文
posted @ 2016-02-01 15:25 侠岚之弋痕夕 阅读(153) 评论(0) 推荐(0) 编辑
上一页 1 ··· 29 30 31 32 33 34 35 36 37 ··· 40 下一页
Where is the starting point, we don't have a choice, but the destination where we can pursue!