[置顶] PHP简单实用的缓存函数

摘要: /*** @说明: 文件缓存输出* @参数: $cachefile => cache文件(绝对路径)* @参数: $pertime => 缓存输出的间隔时间* @参数: $sql => sql语句* @参数: $templatefile => 模板文件名称(绝对路径)**/function __ca... 阅读全文

posted @ 2015-01-07 17:50 < Angus > 阅读(1097) 评论(0) 推荐(0) 编辑

2015年4月16日

linux定时任务

摘要: 如何设置定时任务常用命令crontab -e //编写 * * * * * /usr/bin/php /data/www/12.phpcrontab -l //查看 l列出详细crontab -t //删除没有分钟 小时 日 月 星期 命令*/1每分钟php案... 阅读全文

posted @ 2015-04-16 14:58 < Angus > 阅读(179) 评论(0) 推荐(0) 编辑

php缓存技术 静态缓存 memcache缓存 redis缓存

摘要: php操作缓存生成获取删除 1 class file{ 2 private $_dir; 3 const EXT='.txt'; 4 public function __consruct(){ 5 $this->_dir dirname(__FILE___)... 阅读全文

posted @ 2015-04-16 14:09 < Angus > 阅读(658) 评论(0) 推荐(0) 编辑

php 封装json xml通讯数据方法 php开发APP接口

摘要: //php开发APP接口class Response{ const JSON="json"; public static function show($code,$message,$data=array(),$type=self::JSON){ if(!is_numeric($code)... 阅读全文

posted @ 2015-04-16 13:42 < Angus > 阅读(503) 评论(0) 推荐(0) 编辑

2015年2月12日

安装linux 系统报错:No DEFAULT or UI configuration directive found 解决方法

摘要: 在报错信息后面的boot命令行输入:/isolinux/vmlinuz initrd=/isolinux/initrd.img如果不行重新输入/isolinux/vmlinuz initrd=/isolinux/initrd.img xdriver=vesa nomodesetboot:/isoli... 阅读全文

posted @ 2015-02-12 16:46 < Angus > 阅读(48046) 评论(5) 推荐(0) 编辑

2015年1月19日

php经常用到的数据过滤的方法

摘要: $val) $string[$key] = new_addslashes($val); return $string;}/** * 返回经stripslashes处理过的字符串或数组 * @param $string 需要处理的字符串或数组 * @return mixed */functio... 阅读全文

posted @ 2015-01-19 10:00 < Angus > 阅读(10454) 评论(0) 推荐(1) 编辑

2015年1月7日

php文件上传(多文件上传)

摘要: upload.phpset_upload_path($upload_path);$this->set_allow_type($allow_type);$this->max_size=$max_size;$this->get_upload_files()... 阅读全文

posted @ 2015-01-07 17:56 < Angus > 阅读(392) 评论(1) 推荐(0) 编辑

2014年12月15日

php文件上传下载

摘要: 片名: 请上传大片: pHp:"; var_dump($_POST); echo "";*/ //1.观察数组 /*echo ""; var_dump($_FILES); echo "";*/ $file ... 阅读全文

posted @ 2014-12-15 10:45 < Angus > 阅读(313) 评论(0) 推荐(0) 编辑

2014年12月10日

TMD 去掉双引号我就不用正则表达式!!!

摘要: <?php$str="'你好123'";echo $str;$res = trim($str,"\'\'");echo $res;'你好123'你好123<?php$str="\"你好123\"";echo $str;$res = trim($str,"\"\"");echo $res;"你好123... 阅读全文

posted @ 2014-12-10 17:42 < Angus > 阅读(316) 评论(0) 推荐(0) 编辑

2014年11月18日

tengine2+mysql-5.6+php5.5 Linux 服务器环境架构

摘要: 升级所需要的库sudo -sLANG=Cyum install -y wget gcc gcc-c++ openssl* curl curl-devel libxml2 libxml2-devel glibc glibc-devel glib2 glib2-devel gd gd2 gd-devel... 阅读全文

posted @ 2014-11-18 23:10 < Angus > 阅读(401) 评论(0) 推荐(0) 编辑

导航