- 博客(4)
- 资源 (3)
- 收藏
- 关注
原创 由三目运算符想出的PHP改进建议
在PHP编码过程中,我们经常写到类似下面的语句:1$var = isset($var) && !empty($var) ? $var : $defaultValue;语法看上去很冗长,所以建议简写成1个函数或者创建1个新的运算符||| :1$var = judge($var,$defaultValue);2$var = $var ||| $defaultValue; //
2013-05-25 21:07:25 1718
原创 apache nginx 配置多端口监听,浏览器自动跳转到80端口
最近两天在分别在配置apache 和 nginx 时,都遇到了一个相同的问题: 为apache和nginx开启监听多个端口(比如监听80和8080端口)时,改好配置,重启服务。在浏览器端访问8080端口,url自动跳转到80端口,例如url输入http://**.**.**.**:8080, 则浏览器自动跳转到http://**.**.**.**。而如果如果在url中的8080端
2013-05-10 23:36:07 8643
原创 BAE Website 配置 app.conf 实现单入口
在Baidu Application Engin 中搭建网站时,如果要使用MVC框架,往往需要设置单入口。然而BAE的web服务程序(apache或者lighthttp)对用户是透明的。开发者不能通过修改配置文件,也不能通过修改.htaccess文件来实现单入口。但BAE在应用的根目录提供了app.conf这个配置文件,通过修改它可以实现重写、设置缓存时间的功能。 下面的这
2013-05-10 18:14:48 3334
原创 LNMP启停控制自动脚本
常常在更改LNMP配置之后,需要重启LNMP,在此写了一个自动化脚本,方便重启LNMP。除了方便重新启动,还增加了关闭与开启功能。Operating System: Ubuntu Server代码#!/bin/bashfunction start(){ sudo service nginx start sudo service php5-fpm start}
2013-05-09 13:22:58 1346
checkinstall-1.6.2-CentOS_5.5.x86_64.rpm
2011-03-19
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人