2016年4月8日

摘要: grep来提取行 cut和awk提取列 cut [选项] 文件名 选项: -f列号: 提取第几列 -d分隔符: 按照指定分隔符分割列 # cut -f 2 student.txt # cut -f 2,3 student.txt # cut -d ":" -f 1,3 /etc/passwd cut 阅读全文
posted @ 2016-04-08 14:44 vinbrave.yang 阅读(788) 评论(0) 推荐(0) 编辑

2014年6月16日

摘要: 公司断网了 网络恢复之后 一直提示连不上MySQL服务器 本地能连接 远程不行解决方法如下:选择:网络->windows 防火墙->高级设置->入站规则然后点击右上角的新建规则选择"端口" 下一步,输入3306端口,加入规则,然后再次点击新建规则选择"程序" 找到mysql bin下的启动路径,加入... 阅读全文
posted @ 2014-06-16 21:41 vinbrave.yang 阅读(207) 评论(0) 推荐(0) 编辑

2013年3月29日

摘要: 今天入职培训中讲到了一个mb_detect_encoding()函数 我对这个函数比较陌生,回来之后查了一下这个函数php手册是这样解释的:mb_detect_encoding — 检测字符的编码, string mb_detect_encoding ( string $str [, mixed $encoding_list = mb_detect_order() [, bool $strict = false ]] )这个函数有三个参数 分别是:1.str:待检查的字符串。 2.encoding_list:encoding_list 是一个字符编码列表。 编码顺序可以由数组或者逗号分... 阅读全文
posted @ 2013-03-29 19:09 vinbrave.yang 阅读(507) 评论(0) 推荐(0) 编辑
该文被密码保护。 阅读全文
posted @ 2013-03-29 09:23 vinbrave.yang 阅读(1) 评论(0) 推荐(0) 编辑

2013年3月27日

摘要: where 1=1; 这个条件始终为True,在不定数量查询条件情况下,1=1可以很方便的规范语句。一、不用where1=1在多条件查询中的困扰 举个例子,如果您做查询页面,并且,可查询的选项有多个,同时,还让用户自行选择并输入查询关键词,那么,按平时的查询语句的动态构造,代码大体如下: string MySqlStr=”select * from table where”; if(Age.Text.Lenght>0) { MySqlStr=MySqlStr+“Age=“+“'Age.Text'“; } if(Address.Text.Lenght>0) { MyS 阅读全文
posted @ 2013-03-27 19:31 vinbrave.yang 阅读(93) 评论(0) 推荐(0) 编辑

2013年3月5日

摘要: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>仿新浪网“返回顶部”效果</title><meta http-equiv="content-type" 阅读全文
posted @ 2013-03-05 11:09 vinbrave.yang 阅读(220) 评论(0) 推荐(0) 编辑

2013年2月24日

摘要: 其实,我们真正要做的工作只有两步:1.sudo a2enmod userdir2./etc/init.d/apach2 reload 简单吧?当然,前提是已经有public_html目录,并有index.html文件啰! 阅读全文
posted @ 2013-02-24 11:12 vinbrave.yang 阅读(117) 评论(0) 推荐(0) 编辑

2013年2月22日

摘要: 1.PHP fsockopen函数说明:Open Internet or Unix domain socket connection(打开套接字链接)Initiates a socket connection to the resource specified by target .fsockopen() returns a file pointer which may be used together with the other file functions (such as fgets() , fgetss() , fwrite() , fclose() , and feof() ).就 阅读全文
posted @ 2013-02-22 14:57 vinbrave.yang 阅读(388) 评论(0) 推荐(0) 编辑
摘要: var_export — 输出或返回一个变量的字符串表示.今天公司同事问我怎样将一个数组写入txt ,我一时没有想起来. 现在有这样一个方法.<?php $array = array('a'=>'a','b'=>'b','c'=>'c'); file_put_contents('log.txt', var_export($array,true));?>var_export()函数 阅读全文
posted @ 2013-02-22 13:53 vinbrave.yang 阅读(150) 评论(0) 推荐(0) 编辑
摘要: 2011-10-27 22:56mysql数据库高级部分字符串处理函数=======================================*concat(s1,s2,…Sn) 连接s1,s2..Sn为一个字符串insert(str,x,y,instr)将字符串str从第xx位置开始,y字符串的子字符串替换为字符串strlower(str)将所有的字符串变为小写upper(str)将所有的字符串变为大写left(str,x)返回字符串中最左边的x个字符rigth(str,y)返回字符串中最右边的x个字符lpad(str,n,pad)用字符串pad对str最左边进行填充,直到长度为n个字 阅读全文
posted @ 2013-02-22 10:11 vinbrave.yang 阅读(166) 评论(0) 推荐(0) 编辑

导航