{{include tmpl="#header"
/}}中的include前不要加#,否则就是坑模板嵌套demo网址:http://borismoore.github.io/jsrender/demos/demos.html
分类:
Web程序 时间:
2014-05-01 19:01:40
阅读次数:
449
./nginx: error while loading shared libraries: libpcre.so.1: cannot open shared object file: No such file or directory...
分类:
其他好文 时间:
2014-04-30 22:43:38
阅读次数:
346
对很多人而言,配置Nginx+PHP无外乎就是搜索一篇教程,然后拷贝粘贴。听上去似乎也没什么问题,可惜实际上网络上很多资料本身年久失修,漏洞百出,如果大家不求甚解,一味的拷贝粘贴,早晚有一天会为此付出代价。
假设我们用PHP实现了一个前端控制器,或者直白点说就是统一入口:把PHP请求都发送到同一个文件上,然后在此文件里通过解析「REQUEST_URI」实现路由。
此时很多教程会...
分类:
Web程序 时间:
2014-04-30 22:35:40
阅读次数:
402
javaScript 关于Windows
1 Windows 对象
所有浏览器都支持 window 对象。它表示浏览器窗口。
所有 JavaScript 全局对象、函数以及变量均自动成为 window 对象的成员。
全局变量是 window 对象的属性。
全局函数是 window 对象的方法。
window.document.getElementById("header");
2...
分类:
编程语言 时间:
2014-04-30 22:27:39
阅读次数:
499
public function index(){
header('Content-Type:text/html;charset=utf-8 ');
$M = M("Constant");
$count = $M->where($where)->count();
import("ORG.Util.Page"); // 导入分页类
...
分类:
Web程序 时间:
2014-04-30 22:27:39
阅读次数:
343
header("Content-type:text/html; charset=utf-8");
function getToken($url){
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
//相当关键,这句话是...
分类:
Web程序 时间:
2014-04-30 22:16:40
阅读次数:
373
1. $('node+next') == $('node').next()
2. $('node~siblings') == $('node').nextAll();
3. :gt(index)大于index序号的的元素,从0开始
4. :lt(index)小于index序号的元素,从0开始
4. :header 获取所有h1,h2,h3,h4...的元素...
分类:
Web程序 时间:
2014-04-29 13:45:20
阅读次数:
322
最近在尝试自己写一个Http服务器,在粗略研究了nginx的代码之后,决定仿照nginx中的部分设计自己实现一个高并发的HTTP服务器,在这里分享给大家。...
分类:
其他好文 时间:
2014-04-29 13:38:21
阅读次数:
345
参考博客:http://blog.kuoe0.tw/posts/2014/01/31/install-gnu-gcc-on-os-x-and-use-the-header-bits-stdcplusplus-h-and-policy-based-data-structure
做CF看见别人用这个函数,然后就能直接用vector,set,string那些函数了,摸不着头脑,感觉特神奇就百度了一下,...
分类:
编程语言 时间:
2014-04-29 13:32:22
阅读次数:
433
Problem Description
In the Wide Web World, Which web server was popular in web site? Apache, nginx, lighttpd? Baidu.com use Apache, and many web sites like 163.com use nginx. Why? Its configuration i...
分类:
其他好文 时间:
2014-04-29 13:24:20
阅读次数:
355