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

PHP5ÔÚLinuxÏ°²×°


LinuxÏ°²×°PHP5µÄÖ÷Òª²½Öè:
1.ÏÂÔØphp5£»µØÖ·£ºhttp://cn.php.net/downloads.php
2.½âѹÈí¼þ°üºó½øÈë¸ÃĿ¼
£¨×ªÕß×¢£º
¿ÉÄÜ»áÐèÒªÏȽâѹphp-5.*.tar.bz2 ,ÏÈÖ´ÐÐbzip2 -d php-5.*tar.bz2
£©
tar -xvf php-5.*.tar.gz
cd php-5.*
3.php°²×°mysqlµÄÄ£¿éµÄһЩ׼±¸¹¤×÷
ln -s /usr/local/mysql/lib/mysql /usr/lib/mysql
ln -s /usr/local/mysql/include/mysql /usr/include/mysql
ln -s /usr/local/mysql/bin/mysql_config /usr/bin/mysql_config
×¢Ò⣺(ÒÔºóÔÙÖØбàÒë²»ÐèÒªÖ´ÐÐÕâЩ²Ù×÷) 
4.±àÒë°²×°
#./configure --prefix=/opt/php5
--with-apxs2=/opt/httpd/bin/apxs --with-zlib
--with-config-file-path=/etc --bindir=/usr/bin --sbindir=/usr/sbin
--with-curl --with-exec-dir=/usr/bin --with-xml --with-xmlrpc=shared
--enable-magic-quotes --enable-sockets --enable-mbstring=all
--with-mysql=/usr/bin
(תÕß×¢£º
ÆäÖÐ-prefixΪphp5°²×°Â·¾¶£¬-apxs2ΪapacheĿ¼ÏµÄbin/apxs¡£)
#make
# make install 
5.apache ÅäÖÃ
a¡¢# touch /opt/httpd/conf/extra/httpd-php.conf
    ÎļþÄÚÈÝÈçÏÂ:
#
# PHP is an HTML-embedded scripting language which attempts to make it
# easy for developers to write dynamically generated webpages.
#
LoadModule php5_module modules/libphp5.so
#
# Cause the PHP interpreter to handle files with a .php extension.
#
AddHandler php5-script .php
AddType text/html .php
#
# Add index.php to the list of files that will be served as directory
# indexes.
#
DirectoryIndex index.php
#
# Uncomment the following line to allow PHP to pretty-print .phps
# files as PHP source code:
#
#AddType application/x-httpd-php-source .phps
b¡¢ÐÞ¸Ä httpd.conf£¬ÔÚ×îºóÌí¼ÓÒ»ÐÐ
   vi httpd.conf
  ....
  # php modele
   Include conf/extra/httpd-php.conf
c¡¢ÖØÆô apache ʹ֮ÉúЧ¡£
ת×Ô: Linux¹«Éç
Ô­ÎĵØÖ·£ºhttp://www.linuxidc.com/Linux/2008-10/16738.htm
¸öÈË×ܽ᣺°²×°¹ý³ÌÖгöÏÖÁËһЩÎÊÌ⣬Ö÷ÒªÊÇÅäÖòÎÊýÄÇÀԭÒòÊÇapache·¾¶²»Í¬£¨“--with-apxs2=/opt/httpd/bin/apxs"£©
£¬µ¼ÖµÚÒ»´Î°²×°Ã»ÓÐ×÷Ó㬺óÀ´°ÑÅäÖòÎÊý¸Ä³É
“--


Ïà¹ØÎĵµ£º

PHP ³£Á¿ dirname(__file__)

PHP ³£Á¿ dirname(__file__) ѧϰ
2008Äê09ÔÂ02ÈÕ ÐÇÆÚ¶þ 15:42
PHP ³£Á¿ dirname(__file__)
__FILE__ :±»³ÆΪPHPħÊõ³£Á¿ ,·µ»Øµ±Ç°Ö´ÐÐPHP½Å±¾µÄÍêÕû·¾¶ºÍÎļþÃû,°üº¬Ò»¸ö¾ø¶Ô·¾¶
1£©dirname(__FILE__) º¯Êý·µ»ØµÄÊǽű¾ËùÔÚÔڵķ¾¶¡£   
±ÈÈçÎļþ b.php °üº¬ÈçÏÂÄÚÈÝ£º     ......

linuxÏÂapache+php°²×°³£¼ûÎÊÌâ


linuxÏÂapache+php°²×°³£¼ûÎÊÌâ
configure: error: Unable to find libgd.(a|so)
Èç¹ûʹÓõÄÊÇubuntu»òdebian¾ÍºÜ¼òµ¥ÁË£¬Ö±½Ósudo apt-get install apache2 libapache2-mod-php5 php5 php5-gd ¾Í»ù±¾Éϸ㶨£¬µ«ÊÇÓÃÔ´´úÂë°²×°»¹ÊǺÜÂé·³¡«
wget http://www.boutell.com/gd/http/gd-2.0.11.tar.gz
tar zxvf gd-2.0.11 ......

LinuxÏ»ñÈ¡»úÆ÷ÐÔÄÜ

×¢Òâ¸Ã·½·¨ÊǼÆËãµÄ×Ô¿ª»úÒÔÀ´µÄʹÓÃÂÊ£¬ÊÇÒ»¸öÈ«¾ÖµÄ£¬Ã»¶à´óÒâÒ壬ÿһ´Î¼ÆËãCPUÀûÓÃÂÊ = 100 *£¨user + nice + system£©/£¨user + nice + system + idle£© ÕâÀïÒª¼õÈ¥Ò»¶¨Ê±¼äÒÔÇ°·½¿É¼ÆËã³öÕâÒ»¶Îʱ¼äÄÚµÄcpuʹÓÃÂÊ¡£ "procÎļþϵͳÊÇÒ»¸öαÎļþϵͳ£¬ËüÖ»´æÔÚÄÚ´æµ±ÖУ¬¶ø²»Õ¼ÓÃÍâ´æ¿Õ¼ä¡£ËüÒÔÎļþϵͳµÄ·½Ê½Îª·ÃÎÊÏµÍ ......

RedHat Linux³£¼ûµÄÈÕÖ¾ÎļþºÍ³£ÓÃÃüÁî


³É¹¦µØ¹ÜÀíÈκÎϵͳµÄ¹Ø¼üÖ®Ò»£¬ÊÇÒªÖªµÀϵͳÖÐÕýÔÚ·¢ÉúʲôÊ¡£Linux ÖÐÌṩÁËÒì³£ÈÕÖ¾£¬²¢ÇÒÈÕÖ¾µÄϸ½ÚÊÇ¿ÉÅäÖõġ£Linux ÈÕÖ¾¶¼ÒÔÃ÷ÎÄÐÎʽ ´æ´¢£¬ËùÒÔÓû§²»ÐèÒªÌØÊâµÄ¹¤¾ß¾Í¿ÉÒÔËÑË÷ºÍÔĶÁËüÃÇ¡£»¹¿ÉÒÔ±àд½Å±¾£¬À´É¨ÃèÕâЩÈÕÖ¾£¬²¢»ùÓÚËüÃǵÄÄÚÈÝÈ¥×Ô¶¯Ö´ÐÐijЩ¹¦ÄÜ¡£Linux ÈÕÖ¾´æ´¢ÔÚ /var/log Ŀ¼ÖС£ÕâÀïÓм¸¸öÓ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ