易截截图软件、单文件、免安装、纯绿色、仅160KB

nginx + php + https 配置用例

#
启动服务的用户和组
user
lighttpd lighttpd;
#
开多少进程
worker_processes
2;
#
错误日志
error_log
/data/log/nginx/nginx_error/nginx_error.log crit;
#
pid
pid
        /var/run/nginx.pid;
#
Specifies
the value for maximum file descriptors that can be opened by this
process.
worker_rlimit_nofile
51200;
events
{
    use
epoll;
   
worker_connections
51200;
}
http
{
    #
开两 php-cgi 服务,端口连接方式速度快,socket方式稳定
   
#
使用
lighttpd 的 spawn-fcgi 起的fast-cgi
    #
weight
是设置权重
    upstream phpfastcgi
{
        server

unix:/tmp/php-fastcgi0.sock weight=1;
        server
unix:/tmp/php-fastcgi1.sock weight=1;
        #

server 127.0.0.1:8000  
weight=1;
        #
server 127.0.0.1:8001   weight=1;
   
}
    #
mime 类型 和 默认 header-type
   
include
       mime.types;
    default_type
application/octet-stream;
   
#
默认
header-charset
    charset
utf-8;
    #
一些限制
    server_names_hash_bucket_size
128;
    client_header_buffer_size
32k;
   
large_client_header_buffers
4 32k;
    client_max_body_size
8m;
    #
sendfile
应该是 lighttpd 的 sendfile 是一个意思
    sendfile
on;
    tcp_nopush
     on;
    keepalive_timeout
60;
    tcp_nodelay
on;
    #

fastcgi 配置
   
fastcgi_connect_timeout
300;
    fa


相关文档:

php数据库导出类 导出JSON,XML,WORD,EXCEL

from:http://www.xland.com.cn/article/7/81/0804/28778.htm
本类实现:
数据库信息导出:word,excel,json,xml,sql
数据库恢复:从sql,从文件
具体用法:
首先新建测试用数据库mytest,然后在里面建张表
PHP代码:
以下是代码片段:
--
-- 表的结构 `test`
--
CREATE TABLE `test` (
   `id ......

json + js + php 简单交互

最近在写一个 前台基于 javascript. 的客户端 服务器端PHP 的分析系统。
原先计划使用XML为数据交互基础 但是最终还是选用较轻量级的JSON最为数据交互基础。
首先介绍json的格式
json 说简单其实是一种数据格式  更简单的可以看做简单的数组。
实例 (一)
<script>
  var jsonArray=[
   ......

lighttpd + mysql + php(fast cgi)安装与配置

准备:
lighttpd-1.4.15.tar.gz
php-4.4.2.tar.gz
mysql-5.0.20a.tar.gz
开始:
1 编译安装lighttpd
 # tar zxvf lighttpd-1.4.15.tar.gz
 # cd lighttpd-1.4.15
 #  ls
 # ./configure --prefix=/usr/local/lighttpd    //此部无法编译时提示安装prce-devel
 #&nbs ......

php初学者

我也是一ASP转PHP的初学者,我这里有一好的网站拿来与大家一起分享,希望大家会喜欢!
http://www.w3school.com.cn/
也还有一些好的视频也拿来与大家一起分享!
http://hi.baidu.com/ylinuxs/blog/item/4433d3354a58fed1a2cc2b26.html ......

php中使用header函数的http头设置

/ ok
header('HTTP/1.1 200 OK');
//设置一个404头:
header('HTTP/1.1 404 Not Found');
//设置地址被永久的重定向
header('HTTP/1.1 301 Moved Permanently');
//转到一个新地址
header('Location: http://www.example.org/'
);
//文件延迟转向:
header('Refresh: 10; url=http://www.example.org/');
print 'Y ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号