Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB
ÈÈÃűêÇ©£º c c# c++ asp asp.net linux php jsp java vb Python Ruby mysql sql access Sqlite sqlserver delphi javascript Oracle ajax wap mssql html css flash flex dreamweaver xml
 ×îÐÂÎÄÕ : php

fedoraÏÂphp»·¾³ÅäÖÃ

±àÒë°²×°
apache
ÏÂÔØapache°²×°
=============================
ÎÒ°ÑËû°²×°ÔÚ/usr/local/apacheĿ¼ÏÂ
tar -zxvf apacheÎļþ
½øÈë½âѹºóµÄĿ¼£¬ÅäÖÃ./configure --prefix=/usr/local/apache -enable-mods-shared=all -enable-so -enable-rewrite
make
make install
È»ºóÆô¶¯/usr/local/apache/bin/apachectl start»áÓÐÒ»¸öÌáʾ£¬Ö»Òª°Ñ/usr/local/apache/conf/httpd.confÖеÄserveradminÇ°ÃæµÄ#ºÅ´ò>¿ª¾Í¿ÉÒÔÁË
È»ºóÖØÐÂÆô¶¯£¬ÔÚä¯ÀÀÆ÷ÖнøÐÐlocalhost·ÃÎÊ£¬³É¹¦Ôò¿ÉÒÔ¿´µ½It works!
¼òµ¥ÅäÖÃÒ»ÏÂhttpd.conf
vi /usr/local/apache/conf/httpd.conf (Õâ¸ö·¾¶ÒÔÄ㰲װʱµÄ·¾¶Îª×¼),Èç¹ûÐèÒª¿ÉÒÔ°ÑDocumentRootºÍDirectory¸ÄΪÄãÏëÒªµÄ·¾¶£¬È»ºó
ÔÚ
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
µÄÏÂÃæÌí¼ÓÈçÏÂÁ½ÐУº
AddType application/x-httpd-php .php .phtml
AddType application/x-httpd-php-source .phps
ÓÃÓÚÈÃapache½âÎöphp²¢ÇÒ.phpsÀ©Õ¹ÃûÉèÖóÉÏÔʾ¸ßÁÁµÄphpÔ´Îļþ
×Ô¶¯°²×ªmysql
==============================
fedoraÏÂʹÓà yum install mysql*À´×Ô¶¯°²×°mysql
°²×°php
=========================== ......

PHP »·¾³±äÁ¿

ÔÚPHPÍøÕ¾¿ª·¢ÖУ¬ÎªÁËÂú×ãÍøÕ¾µÄÐèÒª£¬Ê±³£ÐèÒª¶ÔPHP»·¾³±äÁ¿½øÐÐÉèÖúÍÓ¦Óã¬ÔÚÐéÄâÖ÷»ú»·¾³Ï£¬ÓÐʱÎÒÃǸüÐèҪͨ¹ýPHP»·¾³±äÁ¿²Ù×÷º¯ÊýÀ´¶ÔPHP»·¾³±äÁ¿Öµ½øÐÐÉèÖá£Îª´ËÎÒÃÇÓбØÒª¶ÔPHP»·¾³±äÁ¿ÏÈÓÐËùÊìϤ¡£½ñÌìºÍ´ó¼Ò·ÖÏíPHP»·¾³±äÁ¿$_SERVERºÍPHPϵͳ³£Á¿µÄ²¿·ÖÏêϸ˵Ã÷¡£
¡¡¡¡PHP»·¾³±äÁ¿Ö÷ÒªÓÐ$GLOBALS[]¡¢$_SERVER[]¡¢$_GET[]¡¢$_POST[]¡¢$_COOKIE[]¡¢$_FILES[]¡¢$_ENV[]¡¢$_REQUEST[]¡¢$_SESSION[]¡£$_GETºÍ$_POSTÖ÷ÒªÕë¶ÔFORM±íµ¥Ìá½»µÄÊý¾Ý£¬$_COOKIEºÍ$_SESSIONÖ÷ÒªÕë¶Ô¿Í»§¶ËÓÎÀÀÆ÷ºÍ·þÎñÆ÷¶Ë»á»°Êý¾Ý¡£$_FILESÖ÷ÒªÕë¶ÔÎļþÉÏ´«Ê±Ìá½»µÄÊý¾Ý£¬$_REQUESTÖ÷ÒªÕë¶ÔÌá½»±íµ¥ÖÐËùÓÐÇëÇóÊý×飬°üÀ¨$_GET¡¢$_POST¡¢$_COOKIEÖеÄËùÓÐÄÚÈÝ£¬Äã¿ÉÒÔͨ¹ýprint_rº¯Êý·Ö±ðÊä³ö$_REQUEST»òÕß$_COOKIEµÈ½øÐбȽϡ£PHP»·¾³ÈçºÎ´î½¨£¿
PHP»·¾³±äÁ¿$_SERVER
¡¡¡¡ÊÇÒ»¸ö°üº¬·þÎñÆ÷¶ËÏà¹ØÐÅÏ¢µÄPHPÈ«¾Ö»·¾³±äÁ¿£¬ÔÚPHP4.1.0֮ǰµÄ°æ±¾Ê¹ÓÃ$HTTP_SERVER_VARS¡£¸ü¶àÐÅÏ¢¿ÉÒԲο¼ÕâÀï¡£
¡¡¡¡$_SERVER['PHP_SELF'] µ±Ç°ÕýÔÚÖ´Ðнű¾µÄÎļþÃû£¬Óë document rootÏà¹Ø¡£ÔÚFORM±íµ¥ÖУ¬ÈçÖ´ÐÐÎļþÊDZ¾Éí£¬Äã¿ÉÒÔÔÚACTIONÖÐʹÓÃ$_SERVER['PHP_SELF']£¬ºÃ´¦Êǵ±Ö´ÐÐÎļþÃûÓб䶯ʱ¿ÉÒÔ²»È¥Æ ......

Ëæ»úÑ¡Ôñ¶à×éÊý¾ÝµÄÆäÖÐÒ»×éPHP´úÂë

ÕâÊÇËæ»úÑ¡ÔñA0-A3ËÄ×éÊý¾ÝÖÐÆäÖÐÒ»×éPHP´úÂë:
<?php
$A[0]="QQ:<font color=ff32000>7161283</font>";
$A[1]="E_mail:<font color=ff32000>15018499772@139.com</font>";
$A[2]="ÊÖ»ú:<font color=ff32000>15018499772</font>";
$A[3]="MSN:<font color=ff32000>chinaarjun@hotmail.com</font>";
$num = rand(0,4);
echo $A[$num];
?>
Õâ×é´úÂëÄÜËæ»úÊä³öËÄ×éÊý¾ÝÖеÄÈÎÒâÒ»×é¡£ ......

Ò»¸ö¼òªµÄÖ§³ÖHTTPSµÄPHP CURL·â×°º¯Êý

±êÌâÓе㳤£¬Æäʵ¾ÍÊÇÓÃÀ´Ïòhttps·þÎñÆ÷postÊý¾Ý
function curlPost($url, $data, $timeout = 30)
{
$ssl = substr($url, 0, 8) == "https://" ? TRUE : FALSE;
$ch = curl_init();
$opt = array(
CURLOPT_URL => $url,
CURLOPT_POST => 1,
CURLOPT_HEADER => 0,
CURLOPT_POSTFIELDS => (array)$data,
CURLOPT_RETURNTRANSFER => 1,
CURLOPT_TIMEOUT => $timeout,
);
if ($ssl)
{
$opt[CURLOPT_SSL_VERIFYHOST] = 1;
$opt[CURLOPT_SSL_VERIFYPEER] = FALSE;
}
curl_setopt_array($ch, $opt);
$data = curl_exec($ch);
curl_close($ch);
return $data;
}
$data = curlPost('https://ssl.test.com', array('p'=>'hello'));
echo ($data);  ......

phpµ÷Óô洢¹ý³Ì

Àý×Ó³ÌÐò¡£
<?php
    define('CLIENT_MULTI_RESULTS', 131072);
    $link = mysql_connect("127.0.0.1", "root", "",1,CLIENT_MULTI_RESULTS) or die("Could not connect: ".mysql_error());
    mysql_select_db("vs") or die("Could not select database");
?>
        <?php
        $result = mysql_query("call get_news_from_class_id(2)") or die("Query failed:" .mysql_error());
        while($row = mysql_fetch_array($result, MYSQL_ASSOC))
        {
                $line = '<tr><td><a target = _blank href=\''.$row["url"].'\'>'.$row["title"].'('.$row["page_time"].')'.'</a></td></t
r>';
                echo $line;
  ......

FreeBSDÏÂnginx²¢Ö§³ÖphpÅäÖÃÏê½â

ϵͳ¼°Èí¼þ°æ±¾
FreeBSD 7.3
Apache-2.2.14-5[ 1.3.42£¨Unix£©]
PHP-5.2.12
MySQL-5.0.90
Freebsdͨ¹ýport°²×°nginx
Nginx ("engine x") ÊÇÒ»¸ö¸ßÐÔÄÜµÄ HTTP ºÍ·´Ïò´úÀí·þÎñÆ÷£¬Ò²ÊÇÒ»¸ö IMAP/POP3/SMTP ´úÀí·þÎñÆ÷¡£ Nginx ÊÇÓÉ Igor Sysoev Ϊ¶íÂÞ˹·ÃÎÊÁ¿µÚ¶þµÄ Rambler.ru Õ¾µã¿ª·¢µÄ£¬ËüÒѾ­ÔÚ¸ÃÕ¾µãÔËÐг¬¹ýÁ½Äê°ëÁË¡£Igor ½«Ô´´úÂëÒÔÀàBSDÐí¿ÉÖ¤µÄÐÎʽ·¢²¼¡£
Nginx ³¬Ô½ Apache µÄ¸ßÐÔÄܺÍÎȶ¨ÐÔ£¬Ê¹µÃ¹úÄÚʹÓà Nginx ×÷Ϊ Web ·þÎñÆ÷µÄÍøÕ¾Ò²Ô½À´Ô½¶à£¬ÆäÖаüÀ¨ÐÂÀ˲©¿Í¡¢ÐÂÀ˲¥¿Í¡¢ÍøÒ×ÐÂÎŵÈÃÅ»§ÍøվƵµÀ£¬Áù¼ä·¿¡¢56.comµÈÊÓƵ·ÖÏíÍøÕ¾£¬Discuz!¹Ù·½ÂÛ̳¡¢Ë®Ä¾ÉçÇø µÈÖªÃûÂÛ̳£¬¶¹°ê¡¢YUPOOÏà²á¡¢º£ÄÚSNS¡¢Ñ¸À×ÔÚÏßµÈÐÂÐËWeb 2.0ÍøÕ¾¡£
ÏÖÔھ;ÍÀ´Ñ§Ï°ÔÚfreebsd7.0Öа²×°¼°ÅäÖÃnginx£¬ÕâÀïÖ»ÊÇ°Ñapache»»³Énginx£¬ÆäËûphpµÈ¶¼²»±ä£º
Ò»¡¢°²×° nginx-0.7.65
[root@bsd01 ~]#cd /usr/ports
[root@bsd01 ports]#make search key=^nginx
Port:   nginx-0.7.65
Path:   /usr/ports/www/nginx
Info:   Robust and small WWW server
Maint:  osa@FreeBSD.org
B-deps: pcre-8.00
R-deps: pcre-8.00
WWW: &nb ......
×ܼǼÊý:2174; ×ÜÒ³Êý:363; ÿҳ6 Ìõ; Ê×Ò³ ÉÏÒ»Ò³ [10] [11] [12] [13] 14 [15] [16] [17] [18] [19]  ÏÂÒ»Ò³ βҳ
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ