摘要: `addtime` TIMESTAMP DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', 阅读全文
posted @ 2016-04-21 13:46 纵观 阅读(567) 评论(0) 推荐(0) 编辑
摘要: MySQL性能分析及explain用法的知识 1.使用explain语句去查看分析结果 如explain select * from test1 where id=1;会出现:id selecttype table type possible_keys key key_len ref rows ex 阅读全文
posted @ 2016-04-20 15:38 纵观 阅读(127) 评论(0) 推荐(0) 编辑
摘要: 先说下整体思路,代码已附下方。 1、递归产生一个非中奖数(即非连续数字:'111','222','333','444','555','666','777','888') 2、点击摇奖,把奖项通过设置的中奖概率顺序排序(如代码:maopao) 3、放入中奖产生(如代码:get_rand) 4、若中奖则 阅读全文
posted @ 2016-03-03 09:51 纵观 阅读(339) 评论(0) 推荐(0) 编辑
摘要: error_reporting(E_ALL);ini_set('display_errors', '1');ini_set('error_log', dirname(__FILE__) . '/error_log.txt'); //将出错信息输出到一个文本文件 阅读全文
posted @ 2015-10-15 14:31 纵观 阅读(370) 评论(0) 推荐(0) 编辑
摘要: PHP_EOL换行符unix系列用 \nwindows系列用 \r\nmac用 \rPHP中可以用PHP_EOL来替代,以提高代码的源代码级可移植性FILE_APPEND 用于文本追加file_put_contents('./data/llpay1.txt',$data.PHP_EOL,FILE_A... 阅读全文
posted @ 2015-10-14 10:07 纵观 阅读(1325) 评论(0) 推荐(0) 编辑
摘要: preg_match_all('/]*src=(\'|\")(.*?)\\1[^>]*>/i',$goodsD['content'],$match); //正则获取图片路径获取到结果为:array (size=3) 0 => array (size=2) 0 => string ... 阅读全文
posted @ 2015-09-24 09:55 纵观 阅读(5525) 评论(0) 推荐(0) 编辑
摘要: 原理:利用window定时任务定时cmd加载mytask.bat文件,bat运行php.exe程序编译运行mytask.php文件,从而实现了数据库的备份mytask.bat 内容:D:\phpStudy\php53\php.exe D:\www\mytask.phpmytask.php内容:$fi... 阅读全文
posted @ 2015-09-24 00:16 纵观 阅读(452) 评论(0) 推荐(0) 编辑
摘要: $ftp_server = "120.25.1.1";$ftp_user_name = "p1111";$ftp_user_pass = "psa12qwe";$conn_id = ftp_connect($ftp_server) or die("Couldn't connect to $ftp_s... 阅读全文
posted @ 2015-08-26 09:57 纵观 阅读(229) 评论(0) 推荐(0) 编辑
摘要: 突然间session失效了,死活打不上缓存。顺着解决思路:程序--再检查程序--文件权限--查看服务器配置 我只想说一句,我操。尼玛,各种调试,各种自虐。毫无意义,三个钟头流失。看看几点了,快凌晨两点了,恍然大悟,会不会是空间问题?查看了下空间,瞬间哭了,看下图吧使用率已经100%了,这尼玛谁挂载的... 阅读全文
posted @ 2015-07-24 01:56 纵观 阅读(393) 评论(0) 推荐(0) 编辑
摘要: mysql 5.1以上支持定时任务。 SHOW VARIABLES LIKE 'event_scheduler'; 检查是否已开启该功能 开启计划任务功能: SET GLOBAL event_scheduler = 1;或SET GLOBAL event_scheduler = ON; 或者 my. 阅读全文
posted @ 2015-07-15 17:23 纵观 阅读(347) 评论(0) 推荐(0) 编辑