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

phpÖÐset_include_pathº¯ÊýµÄÓ÷¨

phpÖÐset_include_pathº¯ÊýÓ÷¨£º
phpÖеÄset_include_pathº¯Êý¿ÉÓÃÓÚÉèÖÃÓ¦ÓóÌÐòĿ¼,¿ª·¢ÏîĿʱºÏÀíÓ¦ÓÃÕâЩº¯Êý,²»µ«¿ÉÒÔÈÃÎÒÃÇÔÚincludeʱ²»ÓÃÒ»²ãÒ»²ãµÄ¼ÆËãĿ¼,»¹¿ÉÒÔÌá¸ßÎÒÃÇ¿ª·¢µÄЧÂÊ,¼õÉÙÎļþ°üº¬´íÎóÂÊ.
ÀýÈ磺
¼òÀú2¸öphpÎļþ,Ò»¸öĿ¼
λÖýṹÈçÏÂ
/index.php
/include/config.php
index.php£º
<?php
set_include_path("include");
include("config.php");
?>
/include/config.php
ÒÔÏÂΪÒýÓõÄÄÚÈÝ£º
ÎÒÊÇincludeϵÄconfig.php
ÏÖÔÚÎÒÃÇÔËÐÐindex.php
ÔõôÑù,¿´µ½½á¹ûû
ÎÒÃÇincludeʱֻÓÃдconfig.php¾Í¿ÉÒÔ°Ñ/inlcude/config.php Îļþ°üº¬½øÀ´
É趨¶à¸öincludeĿ¼ʱÓà " ;" ºÅ·Ö¿ª
Èç: set_include_path("include;include2;include3;lib;c:\php\lib");
¿ÉÒÔÓÃÏà¶Ô·¾¶Ò²¿ÉÒÔÓþõ¶Ô·¾¶.
»òÐíÕâ¶ÎССµÄ´úÂëÄã¿ÉÄܸоõ²»³öset_include_pathµÄºÃ´¦,²»¹ý²»Òª½ô,ÄãÖ»Òª¼ÇסÕâô¸ö´úÂë¿ÉÒÔʵÏÖÕâÑùµÄ¹¦Äܼ´¿É,ÔÚÄãÒÔºó¼¼ÊõÌáÉÏÈ¥,¿ªÊ¼¿ª·¢´óÐÍÏîĿʱ²»ÒªÍüÁËÓÐÕâô¸öº¯Êý,Ëû¿ÉÒÔ¼õÉÙÄãµÄ¹¤×÷Á¿.
½ãÃú¯Êýget_include_path() ¿ÉÒÔ»ñÈ¡µ±Ê±µÄincludeĿ¼,
ʵÏÖset_include_pathͬÑù¹¦ÄܵĻ¹ÓÐÎÒÃÇÇ¿´óÓÖ¿É°®µÄini_set()
Ó÷¨:
ini_set('include_path', 'Ŀ¼Ãû');


Ïà¹ØÎĵµ£º

·ÃÎÊPHPÀàÖгÉÔ±±äÁ¿»ò·½·¨

ÔÚ·ÃÎÊPHPÀàÖеijÉÔ±±äÁ¿»ò·½·¨Ê±£¬Èç¹û±»ÒýÓõıäÁ¿»òÕß·½·¨±»ÉùÃ÷³Éconst»òÕßstatic,ÄÇô¾Í±ØÐëʹÓòÙ×÷·û::,·´Ö®Èç¹û±»ÒýÓõıäÁ¿»òÕß·½·¨Ã»Óб»ÉùÃ÷³Éconst»òÕßstatic,ÄÇô¾Í±ØÐëʹÓòÙ×÷·û->¡£
ÁíÍ⣬Èç¹û´ÓÀàµÄÄÚ²¿·ÃÎÊconst»òÕßstatic±äÁ¿»òÕß·½·¨,ÄÇô¾Í±ØÐëʹÓÃ×ÔÒýÓõÄself£¬·´Ö®Èç¹û´ÓÀàµÄÄÚ²¿·ÃÎʲ»Îªcons ......

PHP¿ª·¢ÍøÕ¾´úÂë±àд¹æ·¶

Ò»¡¢ ±äÁ¿ÃüÃû
a) ËùÓÐ×Öĸ¶¼Ê¹ÓÃСд
b) Ê××Öĸ¸ù¾Ý±äÁ¿ÖµÀàÐÍÖ¸¶¨
i. ÕûÊýi
ii. ¸¡µãÊýf
iii. ×Ö·û´®s
iv. ²¼¶ûÖµb
v. Êý×éa
vi. ¶ÔÏóo
vii. ×ÊÔ´r
viii. »ìºÏÀàÐÍm
c) ʹÓÃ’_’×÷Ϊÿһ¸ö´ÊµÄ·Ö½ç
ÀýÈ磺
$i_age_max = 10;
$f_price = 22.5;
$s_name =‘harry’;
$b_flag = true; ......

¼ÌÐøÕª³­£ºphpÒ³Ãæ·ÃÎÊʱ£¬Í³Ò»½øÐÐȨÏÞÑéÖ¤µÄÉè¼Æ

¡¡¡¡/***************************
¡¡¡¡* author : ´óÁäÇàÄê
¡¡¡¡* email : wenadmin@sina.com
¡¡¡¡* from: http://blog.csdn.net/hahawen
¡¡¡¡* תÔØÇë±£ÁôÕⲿ·ÖÐÅÏ¢£¬Ð»Ð»
¡¡¡¡***************************/
phpÒ³Ãæ·ÃÎÊʱ£¬Í³Ò»½øÐÐȨÏÞÑéÖ¤µÄÉè¼Æ
ÍíÉÏÓÐÈËÎÊÎÒ¹ØÓÚÍøÕ¾Ò³ÃæÏÔʾµÄʱºò£¬È¨ÏÞÅжϵÄÎÊÌâ¡£ÓÚÊǾÍÓ ......

php¶àÏß³ÌÉÏÏÂÎÄÖа²È«Ð´Îļþ

Ìṩһ¸öphp¶àÏß³ÌÉÏÏÂÎÄÖа²È«Ð´ÎļþµÄʵÏÖ·½·¨¡£Õâ¸öʵÏÖûÓÐʹÓÃphp µÄfile lock»úÖÆ£¬Ê¹ÓõÄÊÇÁÙʱÎļþ»úÖÆ¡£¶àÏß³ÌÖеĸ÷¸öÏ̶߳¼ÊǶԸ÷×Ô£¨Ã¿¸öÏ̶߳ÀÕ¼Ò»¸ö£©µÄÁÙʱÎļþд£¬È»ºóÔÙͬ²½µ½Ô­ÎļþÖС£
<?php
/**
* @usage: used to offer safe file write operation in multiple threads context, arbitory file ......

PHPÖÐthis,self,parentµÄÇø±ð

{Ò»}PHPÖÐthis,self,parentµÄÇø±ðÖ®Ò»thisƪ
       ÃæÏò¶ÔÏó±à³Ì(OOP,Object Oriented Programming)ÏÖÒѾ­³ÉΪ±à³ÌÈËÔ±µÄÒ»Ïî»ù±¾¼¼ÄÜ¡£ÀûÓÃOOPµÄ˼Ïë½øÐÐPHPµÄ¸ß¼¶±à³Ì£¬¶ÔÓÚÌá¸ßPHP±à³ÌÄÜÁ¦ºÍ¹æ»®web¿ª·¢¹¹¼Ü¶¼ÊǺÜÓÐÒâÒåµÄ¡£
PHP5¾­¹ýÖØдºó£¬¶ÔOOPµÄÖ§³Ö¶îÓÐÁ˺ܴóµÄ·ÉÔ¾£¬³ÉΪÁ˾߱¸ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ