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

PHPÎļþ°üº¬Â©¶´Ô­Àí·ÖÎöºÍÀûÓ÷½·¨


                 PHPÎļþ°üº¬Â©¶´Ô­Àí·ÖÎöºÍÀûÓ÷½·¨
±¾ÎÄÕ¼òµ¥ÕªÒª£ºÒ»¡¢Éæ¼°µ½µÄΣÏÕº¯Êý¡²include(),require()ºÍinclude_once(),require_once()¡³ include()&&require()Óï¾ä:°üÀ¨²¢ÔËÐÐÖ¸¶¨Îļþ¡£ÕâÁ½Öֽṹ³ýÁËÔÚÈçºÎ´¦Àíʧ°ÜÖ®ÍâÍêÈ«Ò»Ñù¡£include()²úÉúÒ»¸ö¾¯¸æ¶ørequire()Ôòµ¼ÖÂÒ»¸öÖÂÃü´íÎó¡£»»¾ä»°Ëµ£¬Èç¹ûÄãÏëÔÚÓöµ½¶ªÊ§Îļþʱֹͣ´¦ÀíÒ³Ãæ¾ÍÓÃrequire()¡£include()¾Í²»ÊÇÕâÑù¡£
Ò»¡¢Éæ¼°µ½µÄΣÏÕº¯Êý¡²include(),require()ºÍinclude_once(),require_once()¡³
include() && require()Óï¾ä:°üÀ¨²¢ÔËÐÐÖ¸¶¨Îļþ¡£
ÕâÁ½Öֽṹ³ýÁËÔÚÈçºÎ´¦Àíʧ°ÜÖ®ÍâÍêÈ«Ò»Ñù¡£include() ²úÉúÒ»¸ö¾¯¸æ¶ø require() Ôòµ¼ÖÂÒ»¸öÖÂÃü´íÎó¡£»»¾ä»°Ëµ£¬Èç¹ûÄãÏëÔÚÓöµ½¶ªÊ§Îļþʱֹͣ´¦ÀíÒ³Ãæ¾ÍÓà require()¡£include() ¾Í²»ÊÇÕâÑù£¬½Å±¾»á¼ÌÐøÔËÐС£
Èç¹û”allow_url_fopen”ÔÚ PHP Öб»¼¤»î£¨Ä¬ÈÏÅäÖã©£¬Ò²¿ÉÒÔÓà URL£¨Í¨¹ý HTTP »òÕßÆäËüÖ§³ÖµÄ·âװЭÒ飩¶ø²»ÊDZ¾µØÎļþÀ´Ö¸¶¨Òª±»°üÀ¨µÄÎļþ¡£Èç¹ûÄ¿±ê·þÎñÆ÷½«Ä¿±êÎļþ×÷Ϊ PHP ´úÂë½âÊÍ£¬Ôò¿ÉÒÔÓÃÊÊÓÃÓÚ HTTP GET µÄ URL ÇëÇó×Ö·û´®À´Ïò±»°üÀ¨µÄÎļþ´«µÝ±äÁ¿¡£
Ïêϸ²Î¿¼£ºhttp://www.phpe.net/manual/function.include.php
require_once()¡¡£¦£¦¡¡include_once()
require_once()ºÍinclude_once() Óï¾äÔڽű¾Ö´ÐÐÆÚ¼ä°üÀ¨²¢ÔËÐÐÖ¸¶¨Îļþ¡£´ËÐÐΪºÍ require() Óï¾äÀàËÆ£¬Î¨Ò»Çø±ðÊÇÈç¹û¸ÃÎļþÖеĴúÂëÒѾ­±»°üÀ¨ÁË£¬Ôò²»»áÔٴΰüÀ¨¡£ÊÊÓÃÓÚÔڽű¾Ö´ÐÐÆÚ¼äͬһ¸öÎļþÓпÉÄܱ»°üÀ¨³¬¹ýÒ»´ÎµÄÇé¿öÏ£¬ÄãÏëÈ·±£ËüÖ»±»°üÀ¨Ò»´ÎÒÔ±ÜÃ⺯ÊýÖض¨Ò壬±äÁ¿ÖØи³ÖµµÈÎÊÌâ¡£
Ïêϸ²Î¿¼£ºhttp://www.phpe.net/manual/function.require-once.php
¶þ¡¢ÎªÊ²Ã´Òª°üº¬Îļþ
³ÌÐòԱд³ÌÐòµÄʱºò£¬²»Ï²»¶¸ÉͬÑùµÄÊÂÇ飬Ҳ²»Ï²»¶°ÑͬÑùµÄ´úÂ루±ÈÈçһЩ¹«Óõĺ¯Êý£©Ð´¼¸´Î£¬ÓÚÊǾͰÑÐèÒª¹«ÓõĴúÂëдÔÚÒ»¸öµ¥¶ÀµÄÎļþÀïÃ棬±ÈÈç share.php£¬¶øºóÔÚÆäËüÎļþ½øÐаüº¬µ÷Óá£ÔÚphpÀÎÒÃǾÍÊÇʹÓÃÉÏÃæÁоٵÄÄǼ¸¸öº¯ÊýÀ´´ïµ½Õâ¸öÄ¿µÄµÄ£¬ËüµÄ¹¤×÷Á÷³Ì£ºÈç¹ûÄãÏëÔÚ main.phpÀï°üº¬share.php,ÎÒ½«ÕâÑùдinclude(”share.php”)¾Í´ïµ½Ä¿µÄ£¬È»ºó¾Í¿ÉÒÔʹÓÃshare.phpÖеĺ¯ÊýÁË£¬ÏñÕâ¸öдËÀÐèÒª°üº¬µÄÎļþÃû³ÆµÄ×ÔȻûÓÐʲôÎÊÌ⣬Ҳ²»»á³öÏÖ©¶´£¬ÄÇôÎÊÌâµ½µ×ÊdzöÔÚÄÄÀïÄØ£¿
ÓеÄʱºò¿ÉÄܲ»ÄÜÈ·¶¨ÐèÒª


Ïà¹ØÎĵµ£º

PHPʵÏÖÎļþµÄ¶ÁºÍд¹¦ÄÜ

½øÐÐÎļþµÄ¶ÁºÍд£¬ÏÈ´ò¿ªÒ»¸öÎļþ£¬È»ºó¿ªÊ¼¶Á»òÕßдÎļþ£¬×îºóÔÙ¹ØϵÕâ¸öÎļþ×ÊÔ´¡£
È磬ÎļþµÄ¶Á²Ù×÷£º
<?php
$file = fopen('your file path','r');
while(!feof($file)){ //µ±Ã»ÓжÁÈ¡µ½Îļþ½á⣬¼ÌÐøÑ­»·¶ÁÈ¡²Ù×÷
$line = fgets($file); //¶ÁÈ¡µ½Ò»ÐеÄÄÚÈÝ
echo $line.'<br/>';
}
fclose($file) ......

ubuntu Ï ´î½¨ apache+php+mysql


#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 ......

PHPÍøÕ¾ÓÅ»¯µÄ6¸ö»ù´¡·½·¨

1¡¢Ê¹ÓÃGZip
¡¡¡¡ÔÚÿһ¸öPHPÒ³Ã涥²¿¼ÓÈëÒÔÏ´úÂ룺
<?php ob_start("ob_gzhandler");?>
¡¡¡¡Ê¹ÓøôúÂëºó·þÎñÆ÷»áѹËõËùÓÐÐèÒª´«Ë͵½¿Í»§¶ËµÄ´úÂ룬²¢ÔÚä¯ÀÀÆ÷ÖнøÐнâѹ£¬´Ó¶øʹÍøÕ¾ÔËÐÐËٶȼӿ졣ÕâÒ»¹¦ÄÜ»¹¿ÉÒÔ½ÚÊ¡ÍøÕ¾¿Õ¼äµÄÁ÷Á¿¡£
2¡¢²»ÒªÀÄÓÃJavascriptºÍAjax
¡¡¡¡Ö»ÔÚÐèÒªµÄʱºò²ÅʹÓÃJavascriptºÍAjax ......

·þÎñÆ÷½Å±¾ÓëJavascriptµÄÁ½ÖÖ½»»¥·½Ê½(ÒÔphpΪÀý)

·þÎñÆ÷½Å±¾ÓëJavascriptµÄÁ½ÖÖ½»»¥·½Ê½(ÒÔphpΪÀý)
ÒýÓÃ:http://www.knowsky.com/1014.html
ÔÚÍøÒ³ÖÆ×÷¹ý³ÌÖÐÔõÑùÔÚ²»Ë¢ÐÂÒ³ÃæµÄÇé¿öÏÂʹǰ̨ҳÃæºÍºǫ́CGIÒ³Ãæ±£³Ö½»»¥Ò»Ö±ÊǸöÎÊÌâ¡£ÕâÀï½éÉÜÁ½¸ö·½·¨¡£
·½·¨Ò»£ºÍ¨¹ýCookie½»»¥¡£
Ò»¹²ÊÇÈý¸öÎļþ£¬·Ö±ðΪ£ºindex.htm,action.php,main.htm
Ô­ÀíΪǰ̨ҳÃæmain.htmºÍº ......

phpÓëWebService½»»¥

WebService¼ò½é
Ò»£® ¸ÅÊö
Ä¿Ç°½øÐÐWeb ServiceͨÐÅÓÐÁ½ÖÖЭÒé±ê×¼£¬Ò»ÖÖÊÇXML-RPC£¬ÁíÍâÒ»ÖÖÊÇSOAP¡£
1.        XML-RPC±È½Ï¼òµ¥£¬³öÏÖʱ¼ä±È½ÏÔ磻
2.        SOAP±È½Ï¸´ÔÓ£¬Ö÷ÒªÊÇһЩÐèÒªÎȶ¨¡¢½¡×³¡¢°²È«²¢ÇÒ¸´ÔÓ½»»¥µÄʱºòʹÓá£
PHPÖм ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ