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

UbuntuÏÂÅäÖÃLAMP£¨Linux+Apache+Mysql+PHP)»·¾³

ÖÕÓڷżÙÁË£¬ÕýÏëÔÚÕâ¸ö¼ÙÆÚÀïѧѧPHP£¬ÓÉÓÚ×Ô¼ºÓõÄÊÇ×ÀÃæ°æµÄUbuntu8.04,ÓÚÊǾÍÏë¼ÜÉèÒ»¸öLAMP»·¾³À´Ñ§PHP£¬Ò²³Ã´Ë»ú»áѧһÏÂPHP·þÎñÆ÷µÄ¼ÜÉè¡£
Ò»¡¢°²×°Ubuntu8.04
ËäȻ˵ÊÇÅäÖÃLAMP»·¾³£¬µ«ÔÚÎÄÕÂÀï²¢²»»á½²ÊöÈçºÎ°²×°Ubuntu8.04,ÒòΪ¹ØÓÚÈçºÎUbuntu8.04ÔÚÍøÉÏÒѾ­ÓкܶàµÄ½Ì³ÌÁË£¬¾ÍËãÊÇÓ²ÅÌ°²×°Ò²ÊÇÒ»¼þºÜ¼òµ¥µÄÊÂÁË¡£ÕâÀïÎҾ͸ø³öÒ»¸öÁ´½ÓºÃÁË£¬Ubuntu8.04Ó²ÅÌ°²×°Ö¸ÄÏ£¬µ±È»£¬ÉÏÃæÕâƪÎÄÕÂÖ»ÊǸø³öÁË°²×°µÄÁ½ÖÖ·½·¨£¬Èç¹ûÄãÖØÀ´Ã»Óа²×°¹ýUbuntu£¬½¨ÒéÄãÔÚ°²×°Ç°ÏÈÈ¥¹Ù·½µÄÖÐÎÄWIKIÈ¥Á˽âÏÂÈçºÎ°²×°Ubuntu¡£
¶þ¡¢ApacheµÄ°²×°
Apache×÷Ϊһ¸ö¹¦ÄÜÇ¿´óµÄWeb³ÌÐò£¬×ÔÈ»ÊǼܽ¨Web·þÎñÆ÷µÄÊ×Ñ¡£¬ºÃÁË£¬ÏÂÃæÎÒÃǾÍÀ´°²×°Apache¡£ÔÚÖÕ¶ËÏÂÊäÈëÏÂÔÚÃæÃüÁ
sudo apt-get install apache2
°²×°Íê±Ïºó£¬½ÓÏÂÀ´¾ÍÒªÆô¶¯ApacheÁË
sudo /etc/init.d/apache2 restart
ÔÚä¯ÀÀÆ÷ÀïÊäÈëhttp://localhost»òÕßÊÇhttp://127.0.0.1£¬Èç¹û¿´µ½ÁË“It works!“£¬ÄǾÍ˵Ã÷Apache¾Í³É¹¦µÄ°²×°ÁË£¬ApacheµÄĬÈÏ°²×°£¬»áÔÚ/varϽ¨Á¢Ò»¸öÃûΪwwwµÄĿ¼£¬Õâ¸ö¾ÍÊÇWebĿ¼ÁË£¬ËùÓÐÒªÄܹýä¯ÀÀÆ÷·ÃÎʵÄWebÎļþ¶¼Òª·Åµ½Õâ¸öĿ¼Àï¡£
Èý¡¢PHPµÄ°²×°
ÔÚUbuntuÏ°²×°Èí¼þÊÇÒ»¼þ·Ç³£¼òµ¥µÄÊ£¬Ö»ÐèÒªÒ»¸öÃüÁî¾Í¿ÉÒÔÁË£¬ÔÚÖÕ¶ËÏÂÖ´ÐÐÏÂÃæµÄÃüÁ
sudo apt-get install libapache2-mod-php5 php5
°²×°Íêºó£¬ÎÒÃÇÒªÖØÐÂÆô¶¯Apache£¬ÈÃËü¼ÓÔØPHPÄ£¿é£º
sudo /etc/init.d/apache2 restart
½ÓÏÂÀ´£¬ÎÒÃǾÍÔÚWebĿ¼ÏÂÃæн¨Ò»¸öPHPÎļþÀ´²âÊÔPHPÊÇ·ñÄÜÕý³£µÄÔËÐУ¬ÃüÁ
sudo gedit /var/www/phpinfo.php
È»ºóÊäÈë:
<?php bloginfo(); ?> £¨×¢Ò⣺ʹÓÃʱ½«bloginfo»»³Éphpinfo£¬ÒòΪ·þÎñÆ÷µÄÏÞÖÆ£¬²»ÄÜʹÓÃphpinfoº¯Êý£©
½Ó×ű£´æÎļþ,ÔÚä¯ÀÀÆ÷ÀïÊäÈëhttp://127.0.0.1/phpinfo.php£¬Èç¹û³öÏÖÁËÒ»¸öÏÔʾPHPÔËÐвÎÊýµÄÒ³Ã棬ÄǾÍ˵Ã÷PHPÒѾ­Õý³£ÔËÐÐÁË¡£µ«ÊÇÈç¹ûûÓÐÏÔʾ³öÒ³Ã棬¶øÊÇÌáʾÄãÏÂÔØÎļþ£¬Õâ¾Í˵Ã÷ApacehûÓÐÕýÈ·¼ÓÔØPHPÄ£¿é£¬Õâʱ½â¾öµÄ·½·¨ÊÇ£¬ÔÚ/etc/apache2/apache2.conf »ò /etc/apache2/mods-enabled/php5.confÎļþÀï¼ÓÈëÏÂÃæµÄÒ»ÐÐÃüÁ
AddType application/x-httpd-php .php .phtml .php3
ÔÚ¼ÓÈëÉÏÃæµÄÃüÁîºó£¬ÔÙͨ¹ýÏÂÃæµÄÃüÁîÓ¦ÖØÆôApaceh¸Ã¾ÍÄܽâ¾öÎÊÌâÁË:
sudo /etc/init.d/apache2 stop
sudo /etc/init.d/apache2 restart
ËÄ¡¢MySQLµÄ°²×°
sudo apt-get install mysql-server
ÔÚ°²×°µÄ×îºó£¬Ëü»áÒªÇóÀïÊäÈërootµÄÃ


Ïà¹ØÎĵµ£º

linuxÐÞ¸ÄmacµØÖ·

1£©±ÕÍø¿¨É豸
¡¡¡¡/sbin/ifconfig eth0 down
2£©ÐÞ¸ÄMACµØÖ·
¡¡¡¡/sbin/ifconfig eth0 hw ether 00:50:56:C0:00:01
3£©ÖØÆôÍø¿¨
¡¡¡¡/sbin/ifconfig eth0 up
ͨ¹ýifconfig¿ÉÒÔ¿´µ½ÐÞ¸ÄÒѾ­ÉúЧ,¿ÉÊÇÖØÆô»úÆ÷ºóÓÖ»Ö¸´³ÉÁËÔ­À´µÃmac.
ÒªÏëÓÀ¾ÃÐÞ¸ÄMAC
ÔÚ/etc/rc.d/rc.localÀï¼ÓÉÏÕâÈý¾ä(Ò²¿ÉÒÔÔÚ/etc/init.d/networ ......

Æß´óʵÓÃÃüÁîÐй¤¾ß ÍæתLinuxÍøÂçÅäÖÃ

¡¾51CTO¾«Ñ¡ÒëÎÄ¡¿ËäÈ»ÏÖÔÚ´ó¶àÊýLinux·¢Ðаæ϶¼ÓÐGUIµÄÍøÂç¹ÜÀíÅäÖ㬲»¹ýÊìϤÃüÁîÐй¤¾ß»¹ÊÇ´óÓÐÖúÒæµÄ¡£ÏÂÃæÎÒÃÇÀ´¿´¿´ÕâЩÁ÷ÐÐLinux·¢ÐаæÏÂÃæµÄ³£ÓÃÃüÁî¡£¶ÔÁË£¬Èç¹ûÄãÏëÒªÁ˽â¸Ã¹¤¾ßºÍÑ¡ÏîµÄÏêϸÇé¿ö£¬¿ÉÒÔÊäÈëmanÔÙÊäÈëÕâ¸ö¹¤¾ßµÄÃû×Ö·ÃÎÊÆämanÒ³Ãæ¡£
ÏÖÔھʹò¿ªÄãµÄterminal³¢ÊÔһϰɣ¡
ÓÃÓÚ»ù±¾½Ó¿ÚÓëIPÅäÖÃµÄ ......

PHPÁ¬½ÓMYSQLÊý¾Ý¿â

<p>04¼¶ÐÂÉúÃûµ¥</p>
<table border="1" width="80%" cellpadding="0">
<tr>
<td width="10%" align="center">Id</td>
<td width="20%" align="center">Name</td>
<td width="10%" align="center">Age</td>
<td width="10%" align="cent ......

PHP¹¹Ô캯Êý


¡¡¡¡¹¹Ô캯ÊýÊÇPHPÖÐ×ÜÒªµÄ»ù±¾Óï·¨£¬Ê²Ã´Êǹ¹Ô캯ÊýÄØ?ÎÒÃÇÕâÀï¾ÍÒ»ÆðÀ´¿´¿´PHP¹¹Ô캯Êý¡£Èç¹ûÄãÔÚÒ»¸öÀàÖÐÉùÃ÷Ò»¸öº¯Êý,ÃüÃûΪ__construct,Õâ¸öº¯Êý½«±»µ±³ÉÊÇÒ»¸ö¹¹Ô캯Êý²¢ÔÚ½¨Á¢Ò»¸ö¶ÔÏóʵÀýʱ±»Ö´ÐÐ.Çå³þµØ˵,__ÊÇÁ½¸öÏ»®Ïß.¾ÍÏñÆäËüÈκκ¯ÊýÒ»Ñù,¹¹Ô캯Êý¿ÉÄÜÓвÎÊý»òÕßĬÈÏÖµ.Äã¿ÉÒÔ¶¨ÒåÒ»¸öÀàÀ´½¨Á¢Ò»¸ö¶ÔÏó²¢½ ......

ÔÚphpͼƬÖÐÊäÈëÖÐÎÄÎÄ×Ö½â¾öÂÒÂë

´úÂ룺
<?php
$im = imagecreatefromjpeg("ok.jpg");
$black = @imagecolorallocate($im, 0,0,0);
$jpgnumid = "ÕâÊÇǶÈ뵽ͼƬµÄÎÄ×Ö£¬½â¾öÁËÂÒÂëÎÊÌâ,
ÉÏÃæµÄok.jpgÊÇͬĿ¼ÏµÄÕÕƬ.ʹÓÃËüʱ£¬»¹ÐèÒªÓÐiconv
Ä£¿é£¡Ò²¾ÍÊÇ˵ÔÚphp.iniÀォ
[iconv]
iconv.input_encoding = ISO-8859-1
iconv.internal_encodin ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ