ÇÔ¼ö³ª Ŭ·¡½º Áߺ¹¼±¾ð È®ÀÎ ÇÔ¼ö |
|
|
![](icon/private_name/1.gif) |
16³â Àü |
ÀÛ¾÷À» ÇÏ´Ùº¸¸é ÇÔ¼ö³ª Ŭ·¡½º¸¦ Áߺ¹Çؼ ¼±¾ðÇØ ¿¡·¯°¡ ¹ß»ýÇÏ´Â °æ¿ì°¡ ÀÖ½À´Ï´Ù.
Áߺ¹Çؼ ¼±¾ð ÇÒ °¡´É¼ºÀÌ ÀÖ´Â ÇÔ¼ö³ª Ŭ·¡½º µéÀº ¼±¾ðÇϱâ Àü¿¡ ¸ÕÀú ¼±¾ðÀÌ µÇ¾ú´ÂÁö È®ÀÎÀ» ÇÏ´Â PHPÇÔ¼ö ÀÔ´Ï´Ù.
function_exists(ÇÔ¼ö¸í)
//ÇÔ¼ö°¡ ¼±¾ðµÇ¾îÀÖÀ¸¸é, TRUE¸¦ ¹ÝȯÇÏ°í, ±×·¸Áö ¾ÊÀ¸¸é FALSE¸¦ ¹ÝȯÇÑ´Ù
//ÇÔ¼ö¾È¿¡¼ ¼±¾ðµÈ ÇÔ¼ö´Â ±× ÇÔ¼ö³»¿¡¼¸¸ Àû¿ëÀÌ µË´Ï´Ù.
ex)
if(!function_exists('test'){
function test(){ }
}
class_exists(Ŭ·¡½º¸í)
//Ŭ·¡½º°¡ ¼±¾ðµÇ¾îÀÖÀ¸¸é, TRUE¸¦ ¹ÝȯÇÏ°í, ±×·¸Áö ¾ÊÀ¸¸é FALSE¸¦ ¹ÝȯÇÑ´Ù
ex)
if(!class_exists('test'){
class test { }
}
ÇÔ¼ö¸¦ include½Ã ¿¡´Â include_once()¸¦ »ç¿ë(PHP 4.0.1pl2¿¡¼ Ãß°¡µÊ)ÇϽøé Çѹø¸¸ includeµÇ ÇÔ¼ö Áߺ¹À» ¸·À» ¼ö ÀÖ½À´Ï´Ù. |
|
̵̧ : 232 |
̵̧
¸ñ·Ï
|
|