作者:AlbertWen
添加时间:2012-06-27 20:18:31
修改时间:2025-05-22 19:38:48
分类:
11.PHP基础
编辑
php_sapi_name() 是用来检测PHP运行环境的函数。
该函数返回一个描述PHP与WEB服务器接口的小写字符串。
例如:aolserver, apache,apache2filter, apache2handler, caudium, cgi(until PHP 5.3),cgi-fcgi, cli, continuity, embed, isapi, litespeed, milter, nsapi, phttpd, pi3web, roxen,thttpd, tux, webjames.
作者:AlbertWen
添加时间:2019-03-23 23:50:59
修改时间:2025-07-01 12:10:34
分类:
15.OpenResty_Lua
编辑
cd /home/wenjianbao/456
git clone https://github.com/sumory/lor
cd lor
make install LOR_HOME=/alidata/server/lua/lor LORD_BIN=/alidata/server/lua/lor
# 创建 命令行 工具
sudo ln -s /alidata/server/lua/lor/lord /usr/local/bin/lord
作者:AlbertWen
添加时间:2012-06-25 13:46:46
修改时间:2025-07-01 12:42:35
分类:
16.编程基础/Web安全
编辑
墨西哥同学周末很郁闷的在宾馆上网,发现youtube被ban了,于是写个了tool解决这个问题。顺带想到了一种利用 google 统计的漏洞,写在这里了
http://sirdarckcat.blogspot.com/2009/04/how-to-use-google-analytics-to-dos.html
这个问题实际上是由于 webserver 的 request field limit 造成的。
当 http request header 过长时,webserver 会产生一个400 或者 4xx 错误
Your browser sent a request that this server could not understand.
Size of a request header field exceeds server limit.
作者:AlbertWen
添加时间:2012-06-25 10:43:21
修改时间:2025-07-02 18:38:23
分类:
11.PHP基础
编辑
<?php
/*检测并清除BOM*/
if(isset($_GET['dir'])){
$basedir=$_GET['dir'];
}else{
$basedir = '.';
}
$auto = 1;
checkdir($basedir);
作者:AlbertWen
添加时间:2012-06-23 21:47:44
修改时间:2025-07-02 11:45:29
分类:
11.PHP基础
编辑
我个人理解:getcwd()会随着包含文件的改变而改变,而dirname(__FILE__)不会。即 getcwd() 表示获取当前执行文件的物理路径。
作者:AlbertWen
添加时间:2012-06-22 15:57:35
修改时间:2025-07-02 15:32:52
分类:
11.PHP基础
编辑
作者:AlbertWen
添加时间:2012-06-22 00:18:40
修改时间:2025-07-02 13:51:48
分类:
12.PHP库/系统/微信
编辑
S方法支持缓存有效期,在很多情况下,可能我们并不需要有效期的概念,或者使用文件方式的缓存就能够满足要求,所以系统还提供了一个专门用于文件方式的快速缓存方法F方法。F方法只能用于缓存简单数据类型(数字型、字符串、数值),不支持有效期和缓存对象,使用如下:
作者:AlbertWen
添加时间:2012-06-21 10:28:33
修改时间:2025-07-02 21:07:22
分类:
16.编程基础/Web安全
编辑
作者:AlbertWen
添加时间:2013-07-01 21:13:18
修改时间:2025-07-01 19:50:35
分类:
16.编程基础/Web安全
编辑
XSS攻击在最近很是流行,往往在某段代码里一不小心就会被人放上XSS攻击的代码,看到国外有人写上了函数,咱也偷偷懒,悄悄的贴上来。。。
原文如下:
The goal of this function is to be a generic function that can be used to parse almost any input and render it XSS safe. For more information on actual XSS attacks, check out http://ha.ckers.org/xss.html. Another excellent site is the XSS Database which details each attack and how it works.
作者:AlbertWen
添加时间:2013-07-12 11:13:21
修改时间:2025-07-02 01:55:02
分类:
11.PHP基础
编辑