10 2015 档案

摘要:利用replace、length的内置函数SELECT id, length(field) - length(replace(field,',',''))+1 as count FROM `table` where 1 阅读全文
posted @ 2015-10-19 14:19 根号五 阅读(2851) 评论(0) 推荐(0)
摘要:$('.chooseImage').click(function(){ wx.chooseImage({ count: pic_num, // 默认9,大于9也是显示9 sizeType: ['compressed']... 阅读全文
posted @ 2015-10-16 19:00 根号五 阅读(1286) 评论(0) 推荐(0)
摘要:strstr($a, $b)和strchr()一样,起的别名,表示查找$a中第一次出现$b,并返回字符串的剩余部分: 。strrchr()从后往前查第一个出现的 直接写两行代码: 练练算法,用php部分实现strstr()函数,检查一个串是不是另一个串的子串,简单测了一下可以 阅读全文
posted @ 2015-10-16 16:11 根号五 阅读(598) 评论(0) 推荐(0)
摘要:原文参考:http://www.51ou.com/browse/msyql/43081.html having 和 where 参考 http://blog.csdn.net/yexudengzhidao/article/details/54924471 having是对组进行过滤。where是对行 阅读全文
posted @ 2015-10-13 12:05 根号五 阅读(482) 评论(0) 推荐(0)
摘要:原文地址: http://www.toptal.com/php/10-most-common-mistakes-php-programmers-make 译文地址:http://codecloud.net/php-2056.html Common Mistake #1: Leaving dangli 阅读全文
posted @ 2015-10-13 11:42 根号五 阅读(272) 评论(0) 推荐(0)
摘要:原文地址:http://article.gitos.cn/2015/Aurthur/PHP-Mod-PHP-And-Fast-CGI-Explain.html背景PHP最常用的方式是以模块的方式(mod_php)运行在Apache中,也是Apache运行PHP的默认方式;但在Nginx中,Nginx... 阅读全文
posted @ 2015-10-12 11:33 根号五 阅读(244) 评论(0) 推荐(0)
摘要:【转】http://yulans.cn/linux/linux%E5%B8%B8%E7%94%A8%E7%B3%BB%E7%BB%9F%E4%BF%A1%E6%81%AF%E6%9F%A5%E7%9C%8B%E5%91%BD%E4%BB%A4#系统# uname -a #... 阅读全文
posted @ 2015-10-10 14:35 根号五 阅读(248) 评论(0) 推荐(0)
摘要:pathinfo() - Returns information about a file path parse_str() - Parses the string into variables parse_url() - Parse a URL and return its components 阅读全文
posted @ 2015-10-10 11:38 根号五 阅读(406) 评论(0) 推荐(0)
摘要:<?php// time()echo "time(): ",time();echo "\n";// strtotime()echo "strtotime(): ",strtotime('1991-09-26');echo "\n";// date($format, $timestamp),forma... 阅读全文
posted @ 2015-10-10 11:36 根号五 阅读(384) 评论(0) 推荐(0)
摘要:<?php /** // 一行一行读取一个文件 (文件内容很大的时候,适用。file_get_contents此场景就不太好) $re = fopen("index.php","r+"); while (!feof($re)){ $char = fgets($re);// fgets获取一行,fge 阅读全文
posted @ 2015-10-10 11:13 根号五 阅读(252) 评论(0) 推荐(0)
摘要:架构图: 安装sphinx,见文章http://my.oschina.net/ptk/blog/495435 sphinx关键的配置文件。在里面写查询的sql。 两个关键命令:indexer生成查询索引。searchd是后台进程。命令要添加上这个配置文件的位置。 sphinx主要和两个服务打交道,一 阅读全文
posted @ 2015-10-10 10:04 根号五 阅读(220) 评论(0) 推荐(0)