随笔分类 -  PHP

上一页 1 ··· 8 9 10 11 12 13 14 下一页
I AM A PHPER
摘要: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 侠岚之弋痕夕 阅读(266) 评论(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 侠岚之弋痕夕 阅读(203) 评论(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 侠岚之弋痕夕 阅读(180) 评论(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 侠岚之弋痕夕 阅读(1115) 评论(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 侠岚之弋痕夕 阅读(2001) 评论(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 侠岚之弋痕夕 阅读(283) 评论(0) 推荐(0)
摘要:/*HTML安全过滤*/ function _htmtocode($content) { $content = str_replace('%','%‎',$content); $content = str_replace("<", "<", $content); $content = str_rep 阅读全文
posted @ 2016-02-02 13:28 侠岚之弋痕夕 阅读(193) 评论(0) 推荐(0)
摘要:PHP删除目录及目录下所有文件或删除指定文件 <?php header("content-type:text/html;charset=utf-8"); /** * 删除目录及目录下所有文件或删除指定文件 * @param str $path 待删除目录路径 * @param int $delDir 阅读全文
posted @ 2016-02-01 16:45 侠岚之弋痕夕 阅读(1171) 评论(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 侠岚之弋痕夕 阅读(321) 评论(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 侠岚之弋痕夕 阅读(233) 评论(0) 推荐(0)
摘要:PHP下memcache模块是一个高效的守护进程,提供用于内存缓存的过程式程序和面向对象的方便的接口,特别是对于设计动态web程序时减少对数据库的访问。memcache也提供用于通信对话(session_handler)的处理。 memcache既可以在linux下使用,也可以在windows系统下 阅读全文
posted @ 2016-02-01 15:35 侠岚之弋痕夕 阅读(278) 评论(0) 推荐(0)
摘要:参看地址:http://www.bcty365.com/content-10-2945-1.html 阅读全文
posted @ 2016-02-01 15:25 侠岚之弋痕夕 阅读(161) 评论(0) 推荐(0)
摘要:<?php header("content-type:text/html;charset=utf-8"); $fp = fopen("lock.txt","w+"); if(flock($fp, LOCK_EX)){// 进行排它型锁定 fwrite($fp,"Write something her 阅读全文
posted @ 2016-02-01 15:08 侠岚之弋痕夕 阅读(784) 评论(0) 推荐(0)
摘要:一、数组操作的基本函数 array_values($arr); //获得数组的值 array_keys($arr); //获得数组的键名 array_flip($arr); //数组中的值与键名互换(如果有重复前面的会被后面的覆盖) array_search('PHP',$arr); //检索给定的 阅读全文
posted @ 2016-02-01 15:00 侠岚之弋痕夕 阅读(255) 评论(0) 推荐(0)
摘要:<?php header("content-type:text/html;charset=utf-8"); function get_ext1($filename) { return strrchr($filename,'.'); } function get_ext2($filename){ re 阅读全文
posted @ 2016-02-01 14:04 侠岚之弋痕夕 阅读(605) 评论(0) 推荐(0)
摘要:ob_get_contents() - 返回输出缓冲区的内容 ob_flush() - 冲刷出(送出)输出缓冲区中的内容 ob_clean() - 清空(擦掉)输出缓冲区 ob_end_flush() - 冲刷出(送出)输出缓冲区内容并关闭缓冲 ob_end_clean() - 清空(擦除)缓冲区并 阅读全文
posted @ 2016-02-01 13:56 侠岚之弋痕夕 阅读(318) 评论(0) 推荐(0)
摘要:<?php header("content-type:text/html;charset=utf-8"); $str = "aaaa bbbb cccc dddd"; echo $str; echo '<br/>'; echo nl2br($str); echo '<br/>'; $str_a = 阅读全文
posted @ 2016-02-01 10:44 侠岚之弋痕夕 阅读(189) 评论(0) 推荐(0)
摘要:<?php header("content-type:text/html;charset=utf-8"); function GrabImage($url,$filename="") { if($url=="") return false; if($filename=="") { $ext=strr 阅读全文
posted @ 2016-02-01 10:23 侠岚之弋痕夕 阅读(364) 评论(0) 推荐(0)
摘要:方法一: <?php header("content-type:text/html;charset=utf-8"); //指定图片路径 $src = "img/a.png"; //获取图片信息 $info = getimagesize($src); //获取图片扩展名 $type = image_t 阅读全文
posted @ 2016-02-01 10:14 侠岚之弋痕夕 阅读(574) 评论(0) 推荐(0)
摘要:<?php // header("content-type:text/html;charset=utf-8"); /** * 功能:php生成缩略图片的类 */ class ResizeImage{ public $type;//图片类型 public $width;//实际宽度 public $h 阅读全文
posted @ 2016-01-31 17:21 侠岚之弋痕夕 阅读(180) 评论(0) 推荐(0)

上一页 1 ··· 8 9 10 11 12 13 14 下一页
Where is the starting point, we don't have a choice, but the destination where we can pursue!