当匹配中的分组有嵌套时,是从外向里匹配的,其次在由左向右匹配 摘抄自http://social.msdn.microsoft.com/Forums/en-US/4305d5d4-1709-4c0f-86ae-3db78d08bced/url 在写一个采集网页源代码的时候遇到一个问题: 匹配URL,以 Read More
posted @ 2014-09-26 14:16 大匠 Views(132) Comments(0) Diggs(0) Edit
//$str = 'fff&sdf你是sdf好fdf啊b歌hello中world';$str = 'd你b_fff是好啊歌中潺潺 ';echo chineselength($str)." <br>";function chineselength($str){ $s=iconv("utf-8","gb Read More
posted @ 2014-09-26 10:57 大匠 Views(274) Comments(0) Diggs(0) Edit
/usr/local/php/sbin/php-fpm 却无法启动,提示错误:ERROR: failed to load configuration file '/usr/local/php/etc/php-fpm.conf'ERROR: FPM initialization failedcd/us... Read More
posted @ 2014-09-23 22:50 大匠 Views(115) Comments(0) Diggs(0) Edit
php查看扩展的详细信息 php --ri memcached 无法加载'pdo_mysql' ,因为需要pdo这个module。PHP Warning: Cannot load module 'pdo_mysql' because required module 'pdo' is not load Read More
posted @ 2014-09-21 23:14 大匠 Views(825) Comments(0) Diggs(0) Edit
alter database leeleeshow default character set=utf8; Read More
posted @ 2014-09-21 17:54 大匠 Views(114) Comments(0) Diggs(0) Edit
mysql下载https://downloads.mysql.com/archives/community/安装文档https://dev.mysql.com/doc/refman/5.7/en/installing-source-distribution.html 安装时指定了DWITH_SSL使 Read More
posted @ 2014-09-20 21:38 大匠 Views(447) Comments(0) Diggs(0) Edit
grep命令可以指定文件中搜索特定的内容,并将含有这些内容的行标准输出。grep全称是Global Regular Expression Print-c:只输出匹配行的计数。-I:不区分大小写(只适用于单字符)。-h:查询多文件时不显示文件名。-l:查询多文件时只输出包含匹配字符的文件名。-n:显示... Read More
posted @ 2014-09-20 14:48 大匠 Views(550) Comments(0) Diggs(0) Edit
关于nginx和apache省略index的写法 location / { try_files $uri $uri/ /index.php?$query_string; } ################# <Directory /> Options +Indexes +Includes +Fol Read More
posted @ 2014-09-18 16:02 大匠 Views(464) Comments(0) Diggs(0) Edit
在操作查看vi /etc/passwd 查看用户信息时,不小心修改了root的用户名改成了eoot,这样在切换到普通用户后,就切不回root,即使明明知道用户名是eoot,也知道原来的root密码,但死活切不过去啦,而普通用户有没有关机权限,这样强制关机了,根据网上的搜素重启centos->再启动过... Read More
posted @ 2014-09-14 09:19 大匠 Views(444) Comments(0) Diggs(0) Edit
init 0;init是所有进程的祖先﹐它的进程号始终为1﹐所以发送TERM信号给init会终止所有的用户进程﹑守护进程等。shutdown 就是使用这种机制。init定义了8个运行级别(runlevel), init 0为关机﹐init 1为重启。shutdown -h now shutdown命... Read More
posted @ 2014-09-13 15:14 大匠 Views(218) Comments(0) Diggs(0) Edit