Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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¼ì²âajax·½Ê½µÄµ÷ÓÃÇëÇó

±ÈÈçÒª¸øÓû§±¨¸æÒ»¸ö´íÎó£¬ÓÃÏÂÃæµÄ·½·¨£º
ʹÓÃset_error_handlerÉèÖÃ×Ô¼ºµÄ´íÎó´¦Àíº¯Êý£¬ÔÚ±¨´íµÄµØ·½Ê¹ÓÃtrigger_error£¬ÔÚ×Ô¶¨ÒåµÄ´íÎó´¦Àíº¯ÊýÖиøÓû§ÏÔʾһ¸ö³ö´íÐÅÏ¢Ò³Ãæ¡£
µ«
ÊÇÈç¹ûµ÷ÓÃtrigger_errorµÄÕâ¸öÒ³ÃæÊDZ»Ò»´ÎajaxÇëÇó´¥·¢µÄ£¬ÄÇôajax·µ»Øºó½«µÃµ½Ò»´ó¶ÑÓÃÓÚÏÔʾ´íÎóµÄhtml´úÂë¡£¶øÒ»°ã
ajaxµ÷Óö ......

web serverʹÓÃphpÉú³ÉwebÒ³ÃæµÄÈýÖÖ·½Ê½

²éÕÒmysql_pconnectʱÔÚmysql°ïÖúÎĵµÉÏ·¢Ïֵ쬼ÇÔÚÕâÀï¡£
web serverʹÓÃphpÉú³ÉÒ»¸öwebÒ³ÃæµÄÈýʽÓÐÒÔÏÂÈýÖÖ£º
Ò»£º°ÑPHP×÷ΪCGI Wrapper¡£ÕâÖÖ·½Ê½Ï£¬Ã¿¸öµ½´ïweb serverµÄÇëÇ󶼻ᵼÖÂÒ»¸öphp½âÎöÆ÷½ø³Ì±»´´½¨£¬µ±Õâ¸öphpÒ³ÃæÖ´ÐнáÊøÊ±£¬Õâ¸öphp½âÎöÆ÷½ø³ÌÖÕÖ¹¡£
¶þ£º
ÔÚ¶à½ø³ÌµÄweb serverÖУ¬°Ñphp×÷Ϊweb
se ......

ÈçºÎÓÃC ±àдPHPÀ©Õ¹

PHPÈ¡µÃ³É¹¦µÄÒ»¸öÖ÷ÒªÔ­ÒòÖ®Ò»ÊÇËýÓµÓдóÁ¿µÄ¿ÉÓÃÀ©Õ¹¡£web¿ª·¢ÕßÎÞÂÛÓкÎÖÖÐèÇó£¬ÕâÖÖÐèÇó×îÓпÉÄÜÔÚPHP·¢ÐаüÀïÕÒµ½¡£PHP·¢Ðаü°üÀ¨Ö§³Ö¸÷ÖÖÊý¾Ý¿â£¬Í¼ÐÎÎļþ¸ñʽ£¬Ñ¹Ëõ£¬XML¼¼ÊõÀ©Õ¹ÔÚÄÚµÄÐí¶àÀ©Õ¹¡£
¡¡¡¡À©Õ¹APIµÄÒýÈëʹPHPÈ¡µÃÁ˾޴óµÄ½øÕ¹£¬À©Õ¹API»úÖÆÊ¹PHP¿ª·¢ÉçÇøºÜÈÝÒ׵Ŀª·¢³ö¼¸Ê®ÖÖÀ©Õ¹¡£¡£À©Õ¹Ö÷ÒªµÄ˼ÏëÊÇ ......

PHP ɾ³ýij¸öĿ¼ÏÂNÌìǰµÄËùÓÐÎļþ

<?php
function delfile($dir,$n) //ɾ³ýDIR·¾¶ÏÂNÌìǰ´´½¨µÄËùÓÐÎļþ;
{
if(is_dir($dir))
{
if($dh=opendir($dir))
{
while (false !== ($file = readdir($dh)))
{
if($file!="." && $file!="..")
{
$fullpath=$dir."/".$file;
if(!is_dir($fullpath)) ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ