¾È±Ô °øºÎ¹æ

ACTIVE SERVER PAGE > ±âŸ °ü·Ã ÇÔ¼ö

µî·ÏÀÏ : 2017-07-04 17:36 Á¶È¸¼ö : 52,861

ÀÌ ÆäÀÌÁö ¿¡¼­´Â À¯¿ëÇÏ°Ô »ç¿ëÇÏ´Â ÇÔ¼öÁß¿¡ ¾Õ¼­ ´Ù·çÁö ¾Ê¾Ò´ø ÇÔ¼öµéÀ» Á¤¸®ÇØ º¸°íÀÚ ÇÕ´Ï´Ù.
 
8.4.1 IsArray()
  ÀÌ ÇÔ¼ö´Â º¯¼ö°¡ ¹è¿­ÀÎÁöÀÇ ¿©ºÎ¸¦ ³ªÅ¸³»´Â ÇÔ¼ö ÀÔ´Ï´Ù. ¸®ÅÏ°ªÀº Boolean ÀÔ´Ï´Ù.

 

		ankyu="¾È±Ô´Â/¸ÚÀïÀÌ/ÀÔ´Ï´Ù."
		if IsArray(ankyu)=true then 
		   response.write "¹è¿­ÀÔ´Ï´Ù."&"<br>"
		else
		   response.write "¹è¿­ÀÌ ¾Æ´Õ´Ï´Ù."&"<br>"
		end if
	
		ankyu=split(ankyu,"/")
		
		if IsArray(ankyu)=true then 
		   response.write "¹è¿­ÀÔ´Ï´Ù."&"<br>"
		else
		   response.write "¹è¿­ÀÌ ¾Æ´Õ´Ï´Ù."&"<br>"
		end if  	
 
  À§ÀÇ ¿¹Á¦¿¡¼­´Â ankyu º¯¼ö´Â ÇöÀç ¹è¿­ÀÌ ¾Æ´Õ´Ï´Ù. °á°ú´Â '¹è¿­ÀÌ ¾Æ´Õ´Ï¶ó'°¡ Ãâ·ÂÀÌ µË´Ï´Ù.
  ±×·±ÈÄ splitÇÔ¼ö¸¦ ÅëÇؼ­ ¹®ÀÚ¿­À» ³ª´©¾î ¹è¿­Çü½ÄÀ¸·Î ¹®ÀÚ¿­À» ÀúÀåÇÏ¿´½À´Ï´Ù.
  ´Ù½Ã ºñ±³ÇØ º¸¸é À̹ø¿£ "¹è¿­ÀÔ´Ï´Ù." ¹®ÀÚ¿­ÀÌ Ãâ·ÂµÇ´Â°ÍÀ» ¾Ë°í ÀÖ½À´Ï´Ù.
 
8.4.2 IsEmpty()
  ÀÌ ÇÔ¼ö´Â º¯¼ö°¡ ÃʱâÈ­°¡ µÇ¾î ÀÖ´ÂÁö ¾Æ´ÑÁö ¿©ºÎ¸¦ ³ªÅ¸³À´Ï´Ù.

ankyu0="¾È±Ô´Â/¸ÚÀïÀÌ/ÀÔ´Ï´Ù."
ankyu1=""
response.write isEmpty(ankyu0)&"<br>"
response.write isEmpty(ankyu1)&"<br>"
response.write isEmpty(ankyu2)&"<br>"


À§ÀÇ ¿¹Á¦¿¡¼­ ankyu0,ankyu1Àº ÃʱâÈ­°¡ µÇ¾î ÀÖ½À´Ï´Ù.
°á°ú´Â False °¡ ¸®Åϵ˴ϴÙ. isEmpty´Â ÃʱâÈ­°¡ µÇ¾î ÀÖÀ¸¸é false¸¦ ±×·¸Áö ¾ÊÀ¸¸é true¸¦
¸®ÅÏÇÕ´Ï´Ù.
¸¶Áö¸· isEmpty(ankyu2) ¿¡¼­ ankyu2 º¯¼ö´Â ÃʱâÈ­ µÇ¾î ÀÖÁö ¾Ê±â ¶§¹®¿¡ true¸¦ ¸®ÅÏÇÕ´Ï´Ù.

8.4.3 IsNull()
  IsNull ÇÔ¼ö´Â IsEmpty ÇÔ¼ö¿Í ÇÔ°Ô Àý ¾ÆÁÖ ±«·ÓÇû´ø ÇÔ¼öÁß¿¡ Çϳª ÀÔ´Ï´Ù.
  Isnull ÇÔ¼ö´Â null °ªÀÎÁö ¾Æ´ÑÁö ¿©ºÎ¸¦ ¸®ÅÏÇÕ´Ï´Ù.

ankyu0="¾È±Ô´Â/¸ÚÀïÀÌ/ÀÔ´Ï´Ù."
ankyu1=""
ankyu2=null
response.write isNull(ankyu0)&"<br>"
response.write isNull(ankyu1)&"<br>"
response.write isNull(ankyu2)&"<br>"
response.write isNull(ankyu3)&"<br>"
 

À§ÀÇ ¿¹Á¦¿¡¼­ true ¸¦ ¸®ÅÏÇÏ´Â º¯¼ö´Â ankyu2 ¹Û¿¡ ¾ø½À´Ï´Ù.
null °ªÀÎÁö ¾Æ´ÑÁö¸¸À» üũ ÇÕ´Ï´Ù.

8.4.4 IsNumeric()
  º¯¼öÀÇ °ªÀÌ ¼ýÀÚ·Î ¹Ù²ð¼ö ÀÖ´ÂÁö ¿©ºÎ¸¦ ¸®ÅÏÇØ ÁÝ´Ï´Ù.

ankyu0="123"
ankyu1=""
ankyu2="11a"
response.write isNumeric(ankyu0)&"<br>"
response.write isNumeric(ankyu1)&"<br>"
response.write isNumeric(ankyu2)&"<br>"


À§ÀÇ ¿¹Á¦¿¡¼­ ¼ýÀÚ·Î ¹Ù²ð¼ö ÀÖ´Â º¯¼ö´Â ankyu0 ¹Û¿¡ ¾ø½À´Ï´Ù.
 
¡Ø Ȥ½Ã µµ¿òÀÌ µÇ¼Ì´Ù¸é ´ñ±Û¿¡ ÇѸ¶µð ³²°ÜÁÖ¼¼¿ä!
ÀÛ¼ºÀÚ   ºñ¹Ð¹øÈ£
ÀÚµ¿±Û ¹æÁö     (ÀÚµ¿±Û ¹æÁö ±â´ÉÀÔ´Ï´Ù.)
³»¿ë   ´ñ±Û´Þ±â 
À̸ÞÀÏ ¹®ÀÇ : cak0280@nate.com  
Copyright 2000 By ENTERSOFT.KR All Rights Reserved.