易截截图软件、单文件、免安装、纯绿色、仅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


相关文档:

YAHOO PHP面试题

知道差距了,努力吧!
1. Which of the following will not add john to the users array?
1. $users[] = 'john';
2. array_add($users,'john');
3. array_push($users,'john');
4. $users ||= 'john';
2. What's the difference between sort(), asort() and ksort? Under what circumstances would you use each o ......

php开发web程序的几点经验记录

以前把php当作一个纯粹的系统编程脚本,从3月份开始第一次使用php写web网站,一点经验在这里总结一下。
一:打开错误显示和错误日志。在php.ini中把dispaly_errors设置为On,或者在脚本开头用ini_set('display_errors', 'On')。
二:
调试工具必备。需要两种调试工具:第一种是调试php脚本的,就像C调试器那样可以在脚本 ......

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 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号