Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

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
 #  make
 #  make install
 ´´½¨ÍøÕ¾¸ùĿ¼
 # mkdir /usr/local/lighttpd/htdocs
 ´´½¨ÅäÖÃÎļþ·ÅÖÃĿ¼
 #mkdir /usr/local/lighttpd/etc
´´½¨ÈÕ־Ŀ¼
#mkdir /usr/local/lighttpd/logs
½«ÅäÖÃÎļþ¿½±´µ½/usr/local/lighttpd/etc
#cp doc/lighttpd.conf /usr/local/lighttpd/etc
 
 Æô¶¯lighttpd
 #/usr/local/lighttpd/sbin/lighttpd -f /usr/local/lighttpd/etc/lighttpd.conf
ÎÒÔÚ°²×°µÄʱºòÔÚerrorÈÕÖ¾³öÏÖ opening errorlog '/var/log/lighttpd/access.log
ÔÚ/var/logϽ¨Á¢lighttpdĿ¼¾Í¿ÉÒÔÁË
 
2 °²×° MYSQL
#  tar zxvf mysql-5.0.20a.tar.gz
#  cd mysql-5.0.20a
#  ./configure --prefix=/usr/local/mysql
#  make;make install
# groupadd mysql
# useradd -g mysql mysql
# cp support-files/my-medium.cnf /etc/my.cnf
# cd /usr/local/mysql/
³õʼ»¯
#  bin/mysql_install_db --user=mysql
ÔËÐÐ
bin/mysqld_safe --user=mysql &
ÉèÖÃ×Ô¶¯Æô¶¯£¨ÂÔ£©
3 °²×° php (fast-cgi)
# tar zxvf php-4.4.2.tar.gz
# cd php-4.4.2
±àÒ룬¼Ó --enable-fastcgi ºÍ --enable-force-cgi-redirect Ñ¡Ïî
# ./configure --prefix=/usr/local/php-fastcgi  --enable-fastcgi --enable-force-cgi-redirect --with-zlib --
with-gd --with-ttf --with-png --with-expat-dir=/usr --with-gmp --with-xml --with-mysql=/usr/local/mysql --with-
charset=utf-8 --disable-debug --disable-posix --disable-rpath --enable-safe-mode --enable-magic-quotes --disabl
e-dmalloc --enable-bcmath --enable-dio --enable-gd-native-ttf --enable-sysvsem --enable-sysvshm --enable-wddx -
-enable-versioning --enable-pic --enable-inline-optimization --enable-memory-limit --enable-mbstring --enable-m
bregex --enable-mbstr-enc-trans --with-config-file-path=/usr/local/lib --enable-ft


Ïà¹ØÎĵµ£º

ÓÃPHPʵÏÖÒ»¸öË«Ïò¶ÓÁÐ

<?php
class DoubleQueue
{
public $queue = array();
/**£¨Î²²¿£©Èë¶Ó **/
public function push($value)
{
return array_push($this->queue,$value);
}
/**£¨Î²²¿£©³ö¶Ó**/
public function pop()
{
return array_pop($this->queu ......

MySQL³£Óõĵ¼Èëµ¼³öÃüÁî

³£ÓõÄ:
µ¼³ö
mysqldump -hyour_host -uyour_username -pyour_password database_name > file.sql
µ¼Èë
mysql -hyour_host -uyour_username -pyour_password database_name < file.sql
»òÕßÏÈÓÃmysql¿Í»§¶ËµÇ½ºó£¬
>\. file.sql
Ò²¿ÉÒÔÍê³Éµ¼È빦ÄÜ
ÉÏÃæµÄÁ½¸öÃüÁî½áºÏÆðÀ´Ó㬿ÉÒÔÍê³É½«Ò»¸öÊý¾Ý¿âµÄ ......

¸ßÐÔÄÜMySQLѧϰ±Ê¼Ç(¶þ)

 Ç°×ºË÷Òý
(1)Èç¹ûÒÔ¶à¸ö×Ö¶Î×÷ΪË÷Òý£¨a,b£¬c)×÷Ϊһ¸ökey,ÔÚ²éѯʱ·Ö¸ù¾ÝÆ¥ÅäÇé¿öÊÇ·ñʹÓÃË÷Òý£¬ËùÒÔ£¬a/ a,b/ a,b,cÕâÑùµÄ²éѯ¶¼ÄÜʹÓõ½£¬µ«ÊÇb,a/a,c/c,aµÈ²»·û֪ǰ׺ƥÅä¾Í²»ÄÜʹÓã¬ËùÒÔÔÚдsqlʱÐèҪעÒâ
(2)¶ÔÓںܳ¤µÄ×Ö·û´®ÐèÒªÉú³Ékeyʱ£¬¿ÉÒÔÕÒ³ö×ʹÓõÄ×Ö·û´®µÄ×î³£¼ûǰ׺(ǰN¸ö×ÖÌõ×÷Ϊkey,¶ø²»Êǽ ......

MySql²Ù×÷Àà

×î½üдÁËÒ»¸ö¼òµ¥µÄMysql²Ù×÷À࣬ÄóöÀ´ºÍ´ó¼Ò·ÖÏíһϣ¬»¹Çë¸÷λ¸ßÊÖÖ¸ÕýÒ»ÏÂÎö¹¹º¯ÊýµÄÓ÷¨£º
<?php
/*
* Created on 2010-5-25
*
* To change the template for this generated file go to
* Window - Preferences - PHPeclipse - PHP - Code Templates
*
* class mysql
* made by S71ENCE
*/
class mysql ......

phpÖÐjsonµÄÁ½¸öapi(json_encode|json_decode)

<?php
//¶ÔÏó
class MyJson{
                      $id=1;
                      $site ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ