PHP»º´æ¼¼ÊõÏê½â
PHP»º´æ¼¼ÊõÏê½â
Ò»¡¢»º´æ¼¼Êõ:
ÓÐЩÐÅÏ¢±È·½¾³£²»±äµÄ,µ«ÊÇ»¹ÊÇÄܱäµÄÐÅÏ¢·ÅÔÚ»º´æÖÐÒÔ¼Ó¿ìÏÔʾËÙ¶È,ÕâÊǺÜÓмÛÖµµÄ,ËùνµÄ»º´æ,ͨË×µÄÀí½â¾ÍÊÇһЩ±£´æÔÚ·þÎñÆ÷¶ËµÄ¹²ÓÃЊϢ.ËüÊÇÓÚ·þÎñÆ÷ͬÉúËÀµÄ,ÎÒÃÇÔÚ±£´æ»º´æµÄʱºò¿ÉÒÔÖ¸¶¨Ï´θüеÄʱ¼äµÄÅжÏ,±È·½ÒªÔÚ5·ÖÖÓ¸üÐÂÒ»´Î,¿ÉÒԼǼÉϴθüеÄʱ¼ä,ºÍµ±Ç°Ê±¼ä±È½Ï,Èç¹û ´óÓÚ 5 ·ÖÖÓ ,¶ÁÈ¡Êý¾Ý¿â,¸üл»³É,·ñÔòÖ±½Ó¶ÁÈ¡»º´æÊý¾Ý,µ±È»,»º´æÐèÒª¿Í»§¶ËÓû§¼¤»îµÄ,Ö»ÐèÒ»´Î.
ob_start()º¯Êý:´ò¿ªÊä³ö»º³åÇø.
º¯Êý¸ñʽ void ob_start(void)
˵Ã÷£ºµ±»º³åÇø¼¤»îʱ£¬ËùÓÐÀ´×ÔPHP³ÌÐòµÄ·ÇÎļþÍ·ÐÅÏ¢¾ù²»»á·¢ËÍ£¬¶øÊDZ£´æÔÚÄÚ²¿»º³åÇø¡£ÎªÁËÊä³ö»º³åÇøµÄÄÚÈÝ£¬¿ÉÒÔʹÓà ob_end_flush()»òflush()Êä³ö»º³åÇøµÄÄÚÈÝ¡£
Flush£ºË¢Ð»º³åÇøµÄÄÚÈÝ£¬Êä³ö¡£
º¯Êý¸ñʽ£ºflush()
˵Ã÷£ºÕâ¸öº¯Êý¾³£Ê¹ÓÃ,ЧÂʺܸߡ£
ob_get_contents £º·µ»ØÄÚ²¿»º³åÇøµÄÄÚÈÝ¡£
º¯Êý¸ñʽ£ºstring ob_get_contents(void)
˵Ã÷£ºÕâ¸öº¯Êý»á·µ»Øµ±Ç°»º³åÇøÖеÄÄÚÈÝ£¬Èç¹ûÊä³ö»º³åÇøûÓ줻î,Ôò·µ»Ø FALSE.
ob_get_length£º·µ»ØÄÚ²¿»º³åÇøµÄ³¤¶È¡£
º¯Êý¸ñʽ£ºint ob_get_length(void)
˵Ã÷£ºÕâ¸öº¯Êý»á·µ»Øµ±Ç°»º³åÇøÖеij¤¶È£»ºÍob_get_contentsÒ»Ñù£¬Èç¹ûÊä³ö»º³åÇøûÓ줻î,Ôò·µ»Ø FALSE.
ob_end_clean£ºÉ¾³ýÄÚ²¿»º³åÇøµÄÄÚÈÝ£¬²¢ÇҹرÕÄÚ²¿»º³åÇø
º¯Êý¸ñʽ£ºvoid ob_end_clean(void)
˵Ã÷£ºÕâ¸öº¯Êý²»»áÊä³öÄÚ²¿»º³åÇøµÄÄÚÈݶøÊÇ°ÑËüɾ³ý
ob_end_flush:·¢ËÍÄÚ²¿»º³åÇøµÄÄÚÈݵ½ä¯ÀÀÆ÷£¬²¢ÇҹرÕÊä³ö»º³åÇø
º¯Êý¸ñʽ£ºvoid ob_end_flush(void)
˵Ã÷£ºÕâ¸öº¯Êý·¢ËÍÊä³ö»º³åÇøµÄÄÚÈÝ£¨Èç¹ûÓеĻ°£©
ob_implicit_flush£º´ò¿ª»ò¹Ø±Õ¾ø¶ÔË¢ÐÂ
º¯Êý¸ñʽ£ºvoid ob_implicit_flush ([int flag])
˵Ã÷£ºÄ¬ÈÏΪ¹Ø±Õ»º³åÇø£¬´ò¿ª¾ø¶ÔÊä³öºó£¬Ã¿¸ö½Å±¾Êä³ö¶¼Ö±½Ó·¢Ë͵½ä¯ÀÀÆ÷£¬²»ÔÙÐèÒªµ÷Óà flush()
¶þ¡¢ÎļþдÈë:
int fwrite ( resource handle, string string [, int length]
Ïà¹ØÎĵµ£º
Ò». 1. ǶÈë·½·¨£º »òÕß 2. Ó¦ÓÃÎļþ£º £¨1£©require("MyRequireFile.php")£º·ÅÔÚphp³ÌÐòµÄ×îÇ°Ã棬ÔÚphp³ÌÐòÖ´ÐÐÇ°ÒýÈë £¨2£©include("MyIncludeFile.php")£º·ÅÔÚÁ÷³Ì¿ØÖƵĴ¦Àí²¿·Ö£¬ÔÚÔËÐе½includeʱÔÙ¶ÁÈ¡½øÀ´ 3. ×¢ÊÍ·½·¨£º »ìºÏCºÍ»ã±à£º// £¬/* */£¬ # 4. ±äÁ¿ÀàÐÍ£º £¨1£©PHP±äÁ¿Ò ......
¼¸ÌìûÓиüеÄblogÕâÁ½ÌìÔÚд¸öС¶«Î÷ÍæÍæ
ÏÖÔÚÊÇ»ù±¾ÄÜÓÃÁË
×î½üûʲôÊÂ×ö£¬¾ÍÏëµ½Á˲鿴·þÎñ¶ËĿ¼µÄС³ÌÐòÍæÍæ
ÏÖÔڲ鿴ÒѾдÍêÁË·¢ÉÏÀ´¸ø´ó¼Ò¿´¿´
demoµØÖ·
http://www.web-jia.com/demo/folder/demo.html
ÎÒ·ÖÏíµÄ´úÂ뻶Ӵó¼ÒÀ´ÏÂÔØ°¡
ÏÂÔØ¿ÉÒÔµ½
http://www.web-jia.com/viewthread.php?tid=2832&ext ......
Ò»¡¢Apache HTTP Server °²×°£º
ÔËÐÐApache .msi Îļþ£¬°²×°³ÌÐò½«ÒªÇóÄãÌîдÈçÏÂÄÚÈÝ£º
1. Network Domain¼üÈëÄãµÄ·þÎñÆ÷£¨»òÕßÊÇÄã¼´½«×¢²áµÄ·þÎñÆ÷£©µÄDNS ÓòÃû¡£ÀýÈ磬ÄãµÄ·þÎñÆ÷µÄDNSÓòÃûÈ«³ÆÊÇserver.mydomain.net,ÄãÖ»ÐèÔÚÕâÀïÊäÈëmydomain.net¡£
2. Server Name ¾ÍÊÇÄãµÄ·þÎñÆ÷µÄDNSÓòÃûÈ«³Æ£¬»¹ÊÇÉÏÃæµÄÀ ......
ÏÈ´´½¨Ò»¸öÊý¾Ý¿âMyDB
CREATE DATABASE `mydb` ;
ÔÙ´´½¨Ò»¸ö¼òµ¥µÄÊý¾Ý±í
CREATE TABLE `MyDB`.`MyTable` (
`Name` VARCHAR( 20 ) NOT NULL ,
`Age` INT NOT NULL
) ENGINE = MYISAM
²åÈëһЩÊý¾Ý
INSERT INTO `mydb`.`mytable` (
`Name` ,
`Age`
)
VALUES (
'Jim', '15'
), (
'Amy', '16'
), (
'Jack' ......
´úÂëinterface StringSearchable
{
public function search($substring, $buffer);
}
class BoyerMooreStringSearch implements StringSearchable
{
public $substring = null;
public ......