06 2013 档案
摘要:select * from test where name='zj' and sex='2';我以前也经常用这种写法,今天爬出去看了一下某位人写的,用了一下也挺好用的下面这种写法,一一对应关系
阅读全文
摘要:mysql> select * from test where id in(2,5,4,13,6) order by field(id,2,5,4,13,6) limit 0,6;+----+-------+------+| id | name | sex |+----+-------+------+| 2 | zj_2 | 2 || 5 | zj_5 | 2 || 4 | zj_4 | 2 || 13 | zj_13 | 2 || 6 | zj_6 | 2 |+----+-------+------+有利有弊,order by 和in 我们都...
阅读全文
摘要:1 使用file_get_contents和fopen必须空间开启allow_url_fopen。2 方法:3 4 编辑php.ini,设置allow_url_fopen =true5 On,allow_url_fopen关闭时fopen和file_get_contents都不能打开远程文件。
阅读全文
摘要:test.php 1 <?php 2 $locale='zh_CN'; 3 if(isSet($_GET["locale"]))$locale = $_GET["locale"]; 4 ?> 5 <html> 6 <head> 7 <link rel="gettext" type="application/x-po" href="./locale/<?php echo $locale ?>/LC_MESSAGES/messages.po
阅读全文
摘要:安装gettext:ubuntu: apt-get install php-gettext, apt-get install gettextwindow:开启扩展修改locale :$ /usr/share/i18n/locales //查看支持的语言$ vi /etc/locale.gen //开启语言$ locale-gen //是新设置的locale 生效$ locale -a 查看目前支持的语言example:test.php:';28 echo _("This is book.");29 echo '';30 echo _("He
阅读全文
摘要:在where语句中,rand有时候会出现多条记录本来我还认为不会出现,后来多执行了几次,就出现了我认为他可能是多次结果的和,但是不是,后来我发现又错了,不是,求助于手册,发下下面的话。同时,我看了一下他走没走索引,发现他只走了where,没有走其他的索引,这要注意啊
阅读全文
摘要:安装svn1 apt-get install subversion2 安装图形界面3 sudo add-apt-repository ppa:rabbitvcs/ppa4 5 sudo apt-get update6 7 sudo apt-get install rabbitvcs-core rabbitvcs-nautilus3 rabbitvcs-thunar rabbitvcs-gedit rabbitvcs-cli重启文件管理系统,就可以了nautilus -q pgrep -f service.py | xargs kill nohup nautilus > /dev/null
阅读全文
摘要:---恢复内容开始---sublime text 2学习(二):创建可复用的代码片段对于工程师来讲,写一个html页面的基本结构是体力活,每次去拷贝一个也麻烦,sublime text 2 提供了一个很好的复用代码片段。在菜单上点击Tools -> New Snippet,会新建一个xml文件页签: 1 <snippet> 2 <content><
浙公网安备 33010602011771号