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

php——includeÓï¾ä


Ô­ÎÄÁ´½Ó£ºhttp://www.phpdo.net/index.php/2010/02/02/1-9/
 
PHPÖÐIncludeÓï¾äÔÚÓ÷¨ÉϺÍrequireÓï¾ä»ù±¾Ïàͬ£¬µ«ÊÇËûÃÇ»¹´æÔÚÁ½µã²îÒ죺
   »úÖÆ²»Í¬
 RequireÓï¾äÔÚ½øÐÐÎļþ°üº¬Ê±£¬²»¹ÜÕâÌõrequireÓï¾äÊÇ·ñ±»ÔËÐУ¬¶¼»á½«±»°üº¬´úÂëÖеÄÎļþ°üº¬½øÀ´¡£
 IncludeÓï¾äÔÚ½øÐÐÎļþ°üº¬Ê±£¬Èç¹ûÕâÌõincludeÓï¾äûÓб»ÔËÐУ¬Ôò²»»á½«±»°üº¬´úÂëÖеÄÎļþ°üº¬½øÀ´¡£
ÈçÒÔÏ´úÂ룺
<?php
¡¡$a = 1;
¡¡if($a ==2)       //Èç¹ûµÈÓÚ2£¬Ôòµ÷ÓÃ
¡¡require(“include.inc”);
?>
Õâ¸öÀý×ÓÖÐÌõ¼þûÓÐÂú×㣬ËùÒÔµ÷ÓÃÓï¾äûÓÐÖ´ÐУ¬µ«ÊÇinclude.incÈÔÈ»±»°üº¬½øÀ´£¬Ö»ÊÇûÓб»µ÷Óᣠ
¡¡<?php
¡¡¡¡$a = 1;
¡¡¡¡if($a ==2)
¡¡¡¡include(“include.inc”);
¡¡?> 
Õâ¸öPHP´úÂëÖУ¬³ÌÐòûÓаÑinclude.incÖдúÂë°üº¬½øÀ´¡£
 PHPÖÐÎļþ²»´æÔÚʱµÄ´íÎó´¦Àí·½Ê½²»Í¬
Èç¹ûÎļþÎÞ·¨ÕÒµ½£¬requireºÍincludeµÄ´íÎóÌáʾÊDz»Í¬µÄ¡£
RequireÓï¾ä»áÅ׳öÒ»¸öÖÂÃü´íÎó²¢ÖÐÖ¹½Å±¾µÄÔËÐС£È磺
¡¡<?php
¡¡¡¡require(“inc1.inc”);    //inc1inc²»´æÔÚ
¡¡¡¡echo “This is a test!”;
¡¡?>
ÔËÐнá¹ûÈçÏ£º 
Warning: require(inc1.inc) [function.require]: failed to open stream: No such file or directory in E:\xampp\xampp\htdocs\2.2.test6.php on line 2
 Fatal error: require() [function.require]: Failed opening required ‘inc1.inc’ (include_path=’.;E:\xampp\xampp\php\pear\’) in E:\xampp\xampp\htdocs\2.2.test6.php on line 2
 ·ÖÎö£º¿ÉÒÔ¿´µ½£¬´íÎóÀàÐÍΪFatal error£¬²¢ÇÒ´úÂëÔÚrequire´¦ÖÐÖ¹ÁË¡£
 IncludeÓï¾äÔò»áÅ׳ö¾¯¸æÐÅÏ¢£¬È磺
¡¡<?php
¡¡¡¡include(“inc1.inc”);
¡¡¡¡echo “This is a test!”;
¡¡?> 
½á¹ûÈçÏ£º
Warning: include(inc1.inc) [function.include]: failed to open stream: No such file or directory in E:\xampp\xampp\htdocs\2.2.test7.php on line 2 
Warning: include() [function.include]: Failed opening ‘inc1.inc’ for inclusion (include_path=’.;E:\xampp\xampp\php\pear\’) in E:\xampp\xampp\htdocs


Ïà¹ØÎĵµ£º

Linux»·¾³µÄAMP°²×° PHP°²×°


3¡¢PHP°²×°
1£©»¹ÊÇÏÂÔØÔ´Âë°ü£¬È磺php-5.1.1.tar.gz£¬ÏÂÔØµØÖ·£ºhttp://www.php.net
2£©½âѹËõ£¬>tar -zxvf php-5.1.1.tar.gz
3£©½øÈëphp-5.1.1£¬>cd php-5.1.1
4£©°²×°ÅäÖã¬>./configure --prefix=/opt/php
--with-apxs2=/opt/apache/bin/apxs --with-mysql=/opt/mysql
--with-mysqli=/opt/mysql/bin/ ......

PHP ORM¿ò¼ÜPropel VS Doctrine


ÈÏʶORMÆäʵ×îÔçÔ´×ÔÒ»³¡ÕùÂÛ£¬¸÷¸ö¿ò¼Ü¶¼Éù³Æ¾ß±¸Á¼ºÃµÄORMʵÏÖ£¬µ«ÊÇʹ
Óúó·¢ÏÖ£¬Èç¹û½ö½öÊÇÇ¿ÖÆ·µ»ØÊý¾Ý¶ÔÏó»¹Éù³Æ×Ô¼ºÊÇORMµÄ»°£¬ÄǾÍêÝЦ´ó·½ÁË¡£ÄÇÖ»ÄÜ˵ÊÇαORM»òÊÇORA£¨array£©¶øÒÑ¡£ºÜÏÔÈ»·µ»ØµÄ¶ÔÏó³ýÁË
ÊôÐÔÖµÍ⣬»¹Ó¦¸Ã°üÀ¨¿ÉÖ´Ðз½·¨£¬ÊµÏÖ¶ÔÊý¾ÝµÄ²Ù×÷ÔËÓá£
ºóÀ´¹¤×÷¸ÄÓÃsymfony
¿ò¼Ü£¬¸Ã¿ò¼ÜÄÚÖÃÁ˶ ......

php ¾ÖÓòÍø ͨ¹ý ip ·ÃÎʱ¾»ú

Ô­ÎÄÁ´½Ó http://94798.blog.51cto.com/84798/261991
¶ÔÓÚ´ËÎÊÌâµÄ½â¾ö°ì·¨£¬´ò¿ªapache°²×°Â·¾¶ÖеÄhttp.confÎļþ£¬
ÕÒ´òÒÔÏÂÄÚÈÝ
# onlineoffline tag - don't remove   
    Order Deny,Allow   
    Deny from all  & ......

PHP¸ß¼¶Óï·¨£¨Ò»£©—— Îļþ´¦Àí


PHP
Îļþ´¦Àí
fopen()
º¯ÊýÓÃÓÚÔÚ
PHP
Öдò¿ªÎļþ¡£
´ò¿ªÎļþ
fopen()
º¯ÊýÓÃÓÚÔÚ
PHP
Öдò¿ªÎļþ¡£
´Ëº¯ÊýµÄµÚÒ»¸ö²ÎÊýº¬ÓÐÒª´ò¿ªµÄÎļþµÄÃû³Æ£¬µÚ¶þ¸ö²ÎÊý¹æ¶¨ÁËʹÓÃÄÄÖÖģʽÀ´´ò¿ªÎļþ£º
<html>
<body>
 
<?php
$file=fopen("welcome.txt","r");
?> ......

PHP——ÌØÊâµÄÈ«¾Ö±äÁ¿


Ô­ÎÄÁ´½Ó£ºhttp://www.phpdo.net/index.php/2010/02/01/1-8/
PHP²»Ìṩ¿ç½Å±¾µÄÈ«¾Ö±äÁ¿£¬µ«ÊÇ£¬ÒòΪʵ¼ÊµÄÐèÒª£¬PHPÌṩÁËÒ»Ð©ÌØÊâµÄÈ«¾Ö±äÁ¿ÓÃÀ´ÊµÏÖÕâЩ²Ù×÷¡£
 $_GET[]£º½ÓÊÕÀ´×ÔÓû§ä¯ÀÀÆ÷ʹÓÃGET·½·¨·¢Ë͵ıäÁ¿µÄÊý×é
 $_POST[]£º½ÓÊÕÀ´×ÔÓû§ä¯ÀÀÆ÷ʹÓÃPOST·½·¨·¢Ë͵ıäÁ¿µÄÊý×é
 $_COOKIE[]£º ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ