PHPÍøÕ¾ÓÅ»¯µÄ6¸ö»ù´¡·½·¨
1¡¢Ê¹ÓÃGZip
¡¡¡¡ÔÚÿһ¸öPHPÒ³Ã涥²¿¼ÓÈëÒÔÏ´úÂ룺
<?php ob_start("ob_gzhandler");?>
¡¡¡¡Ê¹ÓøôúÂëºó·þÎñÆ÷»áѹËõËùÓÐÐèÒª´«Ë͵½¿Í»§¶ËµÄ´úÂ룬²¢ÔÚä¯ÀÀÆ÷ÖнøÐнâѹ£¬´Ó¶øʹÍøÕ¾ÔËÐÐËٶȼӿ졣ÕâÒ»¹¦ÄÜ»¹¿ÉÒÔ½ÚÊ¡ÍøÕ¾¿Õ¼äµÄÁ÷Á¿¡£
2¡¢²»ÒªÀÄÓÃJavascriptºÍAjax
¡¡¡¡Ö»ÔÚÐèÒªµÄʱºò²ÅʹÓÃJavascriptºÍAjax£¬Ç§Íò²»ÒªÀÄÓÃËüÃÇ¡£ÓÐЩÍøվʹÓÃÁËÌ«¶à²»±ØÒªµÄAjax¶¯»£¬»òʹÓÃAjaxÀ´¼ÓÔØÎÞÓõIJ¿·Ö¡£ÕâÑùÒ»À´JavascriptÎļþ¾Í»á±äµÃºÜ´ó£¬¶øʵ¼ÊÉÏÈ´ÓкܶàÆäËû·½°¸À´ÊµÏÖÕâЩ¹¦ÄÜ¡£
3¡¢Í¼Æ¬¡¢Í·ÎļþºÍHTTPÇëÇó
¡¡¡¡ÕâÒ»µãÊDZ¾ÎÄ×î¹Ø¼üµÄ²¿·Ö¡£ÍøÒ³ËùÒýÓõÄͼƬ¡¢ÍⲿÎļþÒÔ¼°CSSÑùʽÎļþÔ½¶à£¬ÍøÒ³¾Í¼ÓÔصÃÔ½Âý¡£»¨Ð©Ê±¼ä°ÑͼƬÎļþºÍÆäËûÍⲿÎļþËõСһЩ°É£¬Ê¹ËüÃÇÄܸü¿ìµØ±»¼ÓÔØ¡£´ËÍ⣬ÿһ´Î¼ÓÔØͼƬºÍÍⲿÎļþʱ¶¼»á²úÉúÒ»¸öHTTPÇëÇó£¬ÕâÒ»¶¨»áÍÏÑÓ¼ÓÔØʱ¼ä¡£Äã¿ÉÒÔʹÓÃÏÂÃæµÄ·½·¨À´Ñ¹ËõÍøÒ³Îļþ¡¢JSÎļþÒÔ¼°CSSÑùʽÎļþ£º
ÍøÒ³Îļþ£ºÊ¹ÓÃGZip£¬Çë¼ûµÚÒ»Ìõ
JSÎļþ£ºhttp://www.fmarcia.info/jsmin/test.html Õâ¸öÍøÕ¾¿ÉÒÔÓÐЧµØ¼õСJSÎļþµÄ´óС
CSSÎļþ£ºhttp://www.cssdrive.com/index.php/main/csscompressor/ Õâ¸öÍøÕ¾¿ÉÒÔ¼õСCSSÎļþµÄ´óС
4¡¢ÏÞÖÆMySQL²éѯ´ÎÊý
¡¡¡¡¶ÔÊý¾Ý¿âµÄÿһ´ÎÇëÇ󶼻áʹÍøÒ³µÄ¼ÓÔØËٶȼõ»ºÒ»Ð©¡£ÍøÂ翪·¢ÕßÔÊÐíºÜÄÑ¿ØÖÆÕâÒ»µã£¬µ«ÊÇÔÚһЩϸ½ÚµÄµØ·½ÊÇ¿ÉÒÔ½øÐÐÓÅ»¯µÄ¡£±ÈÈ磬ÔÚÑ¡ÔñÊý¾Ý¿â¼Ç¼ʱ£¬²»ÒªÊ¹ÓÃÒÔÏ´úÂ룺
SELECT * from database
¶øÊÇʹÓãº
SELECT id, name, date, author, etc, blah, blah from database
¡¡¡¡Õâ»áÏûºÄ¸üÉٵIJéѯʱ¼ä²¢¼õÉÙ·þÎñÆ÷µÄ¸ºÔØ¡£
5¡¢.phpÀ©Õ¹Ãû
¡¡¡¡ÓÐЩÈËÈÏΪ½«JSÎļþ±£´æΪfilename.js.phpÒÔ¼°½«CSSÎļþ±£´æΪstylesheet.css.php»áÈüÓÔصÄʱ¼ä¼õÉÙЩ£¬µ«ÎÒ²¢Ã»Óвì¾õµ½ÕâÆäÖеIJî±ð¡£µ±È»£¬Èç¹ûÄãÍøÕ¾µÄËٶȱäµÃºÜÂý£¬Äã¿ÉÒÔÊÔÊÔÕâ¸ö·½·¨¡£µ±È»£¬ÄãÐèÒªÔÚÿ¸öPHPÎļþÖÐÓÃinclude()È¥ÔØÈëÕâЩÎļþ¡£
6¡¢http://www.websiteoptimization.com/
¡¡¡¡µ½Õâ¸öÍøվȥ¼ì²âÒ»ÏÂÄã×Ô¼ºÍøÕ¾£¬Ëü»á¸øÄãһЩÈçºÎ½øÐÐÍøÕ¾ÓÅ»¯µÄ½¨Òé¡£ÎÒÿ´Î½¨Á¢ÐÂÍøҳʱ¶¼»áÓÃÉÏÕâ¸ö¹¦ÄÜ¡£
±¾ÎÄÀ´×Ô£ºhttp://www.yeeyan.com/articles/view/38585/13381
ÔÎÄÁ´½Ó£ºhttp://portfolio.sticktacular.com/resource.php?creation=122
Ïà¹ØÎĵµ£º
#apt-get install apache2
//°²×°apahce2
#apt-get install php5
//°²×°php5
#apt-get install mysql-server
//°²×°mysql·þÎñ¶Ë
#apt-get install mysql-myclient
//°²×°mysqlµÄ¿Í»§¶Ë
#apt-get install php-mysql
//°²×°php-mysqlµÄÁ¬½á
apache+php+mysql »·¾³ÒѾ´î½¨ºÃÁË
½«ÒÔϵķþÎñÖØÆôÒ»ÏÂ
#/et ......
Ò»¡¢µÇ½
1.½øÈëlinux
2.̞: root
3.¿ÚÁî:123456
4.mysql Óû§Ãû root ÃÜÂë 123456
¶þ¡¢Æô¶¯mysqlÓëapache·þÎñ
1.Æô¶¯mysqÊý¾Ý¿â:/usr/local/mysql/bin/./mysqld_safe --user=mysql &
2.Í£Ö¹mysqlÊý¾Ý¿â:/usr/local/mysql/bin/mysqladmin -u root -p shutdown
3.Æô¶¯apache: /usr/local/apache2/bin/./ap ......
class lamp
{
public function __construct()
{
}
public function __get($var) //»ñÈ¡²»´æÔÚµÄÊôÐÔʱµ÷ÓÃ
{
echo "²»´æÔÚ±äÁ¿$var<br>";
}
public function __set($var ......
PHPÊý¾ÝÀàÐÍת»»Ï¸½Ú
1¡¢Êý×Ö£¨ÕûÐκ͸¡µãÐÍÖ®¼ä¿ÉÒÔÏ໥ת»¯£©
ÕûÐÎת»»Îª¸¡µãÐÍ£ºÓÉÓÚ¸¡µãÐ͵ľ«¶È·¶Î§Ô¶´óÓÚÕûÐΣ¬ËùÒÔת»»ºóµÄÊýÖµ¾«¶È²»»á¸Ä±ä¡£
¸¡µãÐÍת»»ÎªÕûÐΣº½²×Ô¶¯ÉáÆúСÊ÷²¿·Ö£¬Ö»±£ÁôÕûÊý²¿·Ö¡£×¢£ºÈç¹ûÒ»¸ö¸¡µãÐͳ¬¹ýÕûÊýÈ¡ÖµµÄÓÐЧ·¶Î§£¬Æä½á¹û½«ÊÇÎÞ·¨È·¶¨µÄ£¨ÕûÊýµÄ×î´óÖµÔ¼ÊÇ2.147e9£©¡£
¡¾Ê¾Àý¡ ......
PHPµÄÓï·¨½á¹¹
±à³ÌÓïÑÔµÄÓï·¨½á¹¹£¨lexical structure£©ÊÇÖ¸¹ÜÀíÈçºÎÓÃÓïÑÔд³ÌÐòµÄ»ù±¾¹æÔòµÄ¼¯ºÏ¡£Óï·¨½á¹¹ÊÇ×îµÍ¼¶µÄÓïÑÔÓï·¨£¬²¢ÇÒÖƶ¨Á˱äÁ¿Ãû³ÆÊÇʲôÑù×Ó£¬Ê²Ã´×Ö·ûͨ³£ÓÃ×ö×¢ÊÍ£¬ÒÔ¼°ÈçºÎ½«³ÌÐòÓï¾ä·Ö¿ªµÈµÈ¡£
PHPµÄ»ù±¾Óï·¨
1¡¢ ´óСд
ͬÄÚÖýṹºÍ¹Ø¼ü×Ö£¨Èçecho¡¢while¡¢classµÈ£©Ò»Ñù£¬Óû§×Ô¶¨ÒåµÄÀàÃû ......