PHPÖеÄħÊõ·½·¨
PHPÖÐÓÐÏÂÁгÆÖ®ÎªÄ§Êõ·½·¨(magic method)µÄº¯Êý:__construct, __destruct ,
__call, __callStatic,__get, __set, __isset, __unset , __sleep, __wakeup,
__toString, __set_state, __clone and __autoload,±¾ÎÄʹÓÃ__callΪʵÏÖÒ»¸öÉí·ÝÑéÖ¤µÄ¼òµ¥ÊµÀý£¬´úÂëÈçÏ£º ´úÂë<?php
interface Accountable
{
const ERR_MSG = "error";
public function isLoggedIn();
public function getAccount($user = '');
}
abstract class Authentication implements Accountable
{
private $account = null;
public function getAccount($user = '')
{
if ($this->account != null) {
return $this->account;
} else {
return ERR_MSG;
}
}
public function isLoggedIn()
{
return ($this->account != null);
}
}
class 
Ïà¹ØÎĵµ£º
PHPµÄsafe_modeÑ¡ÏîµÄÄ¿µÄÊÇΪÁ˽â¾ö±¾ÕÂËùÊöµÄijЩÎÊÌâ¡£
µ«ÊÇ£¬ÔÚPHP²ãÃæÉÏÈ¥½â¾öÕâÀàÎÊÌâ´Ó¼Ü¹¹ÉÏÀ´¿´ÊDz»ÕýÈ·µÄ£¬ÕýÈçPHPÊÖ²áËùÊö(http://php.net/features.safe-mode)¡£
µ±°²È«Ä£Ê½ÉúЧʱ£¬PHP»á¶ÔÕýÔÚÖ´ÐеĽű¾Ëù¶ÁÈ¡£¨»òËù²Ù×÷£©ÎļþµÄÊôÖ÷½øÐмì²é£¬ÒÔ±£Ö¤Óë¸Ã½Å±¾µÄÊôÖ÷ÊÇÏàͬµÄ¡£
ËäÈ»ÕâÑùȷʵ¿ÉÒÔ·À·¶±¾ÕÂÖÐ ......
PHPÓÃmkdir()н¨Á¢Ä¿Â¼ÎÞдµÄȨÏÞµÄÎÊÌâ
ÔÄÀÀ´ÎÊý:
½ñ
Ìì:0 ×Üä¯ÀÀ:526
ÎÄÕÂÀ´Ô´: CPÕûÀí
ÔÎÄ×÷Õß:
ÕûÀíÈÕÆÚ: 2008-08-14
º¯ÊýmkdirÓÐÁ½¸ö²ÎÊý£¬Ä¿Â¼Â·¾¶ºÍ·ÃÎÊȨÏÞ
Àýmkdir('/tmp/test',0777)
È»ºóÒªµÃµ½µÄȨÏÞÂ룬²»Ò»¶¨ÊÇÉϱßÉ趨µÄ£¬µ±Ç°ÏµÍ³µÄumask½«»áÓëÉ趨µÄÖµ‘Óë’£¬ÕâÑù×Ó²ÅÊÇÕæÕýµÄȨÏÞ ......
<?php
//±äÁ¿¶¨Ò壬»ÍÖÔ²»¡Ê±µÄ½Ç¶È´óС
define("ANGLELENGTH",3);
/**
* »æÖÆÍ¼Æ¬
* @param $title 3DͼµÄ±êÌâ
......
ÿһÖÖÓïÑÔ¶¼ÓÐ×Ô¼ºµÄ×Ô¶¯À¬»ø»ØÊÕ»úÖÆ£¬ÈóÌÐòÔ±²»±Ø¹ý·Ö¹ØÐijÌÐòÄÚ´æ·ÖÅ䣬µ«ÊÇÔÚOOPÖУ¬ÓÐЩ¶ÔÏóÐèÒªÏÔʽµÄÏú»Ù£»·ÀÖ¹³ÌÐòÖ´ÐÐÄÚ´æÒç³ö¡£
Ò»¡¢PHP À¬»ø»ØÊÕ»úÖÆ(Garbage Collector ¼ò³ÆGC)
ÔÚPHPÖУ¬Ã»ÓÐÈκαäÁ¿Ö¸ÏòÕâ¸ö¶ÔÏóʱ£¬Õâ¸ö¶ÔÏó¾Í³ÉΪÀ¬»ø¡£PHP»á½«ÆäÔÚÄÚ´æÖÐÏú»Ù£»ÕâÊÇPHP µÄGCÀ¬»ø´¦Àí»úÖÆ£¬·ÀÖ¹ÄÚ´æÒç³ö¡ ......
Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 92160 bytes) in :\Inetpub\wwwroot04\test.php on line 8
Fatal error: Out of memory (allocated 259,260,416) (tried to allocate 16 bytes) in C:\Inetpub\wwwroot04\test.php on line 8
//ini_set('memory_limit', '-1');
$inde ......