2024 12 06
   
 
 
  
 
    ¹æ¼Û
    VJ
    ȨÆäÀÌÁö
    ÇÁ·Î±×·¥
    ³×Æ®¿öÅ©
    html
    JAVA
    C¾ð¾î
    µå¸²À§¹ö
    Ç÷¡½Ã
    Æ÷Åä¼¥
    ÀÏ·¯½ºÆ®
    PHP
    JSP
    XML
  - ºñµð¿ÀÀú³ÎÀÇ
    »ç»ó°ú öÇÐ

  - ¿î¿µÀÚ ÇÖ¶óÀÎ
  - ¹®ÀÇ»çÇ×
  - Á¦ ÈÞ

-¸ð¹ÙÀÏÀÎÅͳݹæ¼Û
-VJ(PD)
   ÀÎÅͳݰø°£

-VJ(PD)
   ÀÎÅͳݹæ¼Û

-½Ã¹ÎÁ¦ÀÛ
   ÀÎÅͳݹæ¼Û

-½Ã»ç NEWS
-VJ(PD),
   ±âÀÚ, ÀÛ°¡

-ÈÄ¿ø¼îÇθô¿î¿µ

- VJ ÀÎÅͳݰø°£
- VJ ³×Æ®¿öÅ©¿¬°á
- VJ Çùȸ±¸¼º
- VJ È«º¸
- Video
   Journalist

- VJ À̸ÞÀϼ­ºñ½º

- ¿ì¸®Ã£±â
- Ä£ÀÏÆÄÀû±ØÀûû»ê
- µ¶µµ/°í±¸·Á ã±â
- ³²ºÏÅëÀϱ¹È£
   ÀÌÁ¨Corea

- ÀÒ¾î¹ö¸°Á¤½Å
   36³â ÀÏÁ¦Ä§·«

- Á¶¼±500³â¿ÕÁ¶
   ºÎÈ°¿îµ¿

- »õ¸¶À»¿îµ¿
   ±¹°¡°¡Ä¡°ü
   (»ç»óÀÌ ÀÖ¾ú´Ù.)

- ½Ã¹Î¿îµ¿¿¬´ë
- ¸ð¹ÙÀÏ ¹æ¼Û

- ¿µ¹® ±¹Á¦
   ±¹³»µµ¸ÞÀÎ

- Çѱ۵µ¸ÞÀÎ
- ÇѱÛÅ°¿öµå
  * µµ¸ÞÀÎ ±âȹ *
°í°´ Áö¿ø ¼¾ÅÍ
¢Ï 02) 2202 - 1009  
ÆòÀÏ : 10:00 ~ 18:00  
ÁÖ¸» : 10:00 ~ 14:00  
ÈÞ¹« & ÈÞÀÏ(°øÈÞÀÏÆ÷ÇÔ)
¢½±ä±Þ»çÇ× :
Mobile : 010-3079-1009

HOME >> ±³À° >> [ PHP ]
¢Ã Á¦¸ñ : PHP - ¿­ÇÏ·ç°³¯ (1203)
¢Ã ºÎÁ¦¸ñ : °Ô½ÃÆÇ(4) - 1.2.3.4 ÃÑÁ¤¸®ÆÇ(»ùÀÚ·á)
 
PHP - ù°³¯ 1ÀÏ-11 19

PHP - µÑ°³¯ 2ÀÏ-11 22

PHP - ¼¼Â°³¯ (1123)

PHP - ³×°³¯ (1124)

PHP - ´Ù¼¸Â°³¯ (1125)

PHP - ¿©¼¸Â°³¯ (1126)

PHP - ÀÏ°ö°³¯ (1129+14½Ã°£)

PHP - ¿©´ú°³¯ (1130)

PHP - ¾Æȩ°³¯ (1201)

PHP - ¿­Â°³¯ (1202)

PHP - ¿­µÑ°³¯ (1206)

PHP - ¿­¼¼Â°³¯ (1207)

PHP - ¿­³×°³¯ (1208)

PHP - ¿­´Ù¼¸Â°³¯ (1209)

PHP - ¿­¿©¼¸Â°³¯ (1210)

PHP - ¿­ÀÏ°ö°³¯ (1213)

PHP - ¿­¿©´ú°³¯ (1214)

PHP - ¿­¾Æȩ°³¯ (1215)

PHP - ½º¹°¹ø°³¯ (1216)

PHP - ½º¹°Çѹø¹ø°³¯ (1217)

PHP - ½º¹°µÎ¹ø°³¯ (1220)

PHP - ½º¹°µÎ¹ø°³¯ (2004/12/21)

PHP - ½º¹°¼¼¹ø°³¯ (2004/12/22)

PHP - ½º¹°³×¹ø°³¯ (2004/12/23)

PHP - ½º¹°³×¹ø°³¯ (2004/12/23)

PHP - ½º¹°´Ù¼¸¹ø°³¯ (2004/12/24)

PHP - ½º¹°¿©¼¸¹ø°³¯ (2004/12/26)

PHP - ½º¹°¿©´ú¹ø°³¯ (2004/12/28)

PHP - ½º¹°¿©´ú¹ø°³¯ (2004 12 28)

PHP - ½º¹°¾ÆÈ©¹ø°³¯ (2004 12 31)

PHP - ¼­¸¥µÎ¹ø°³¯ (2005 01 03)

PHP - ¼­¸¥¼¼¹ø°³¯ (2005 01 04)

PHP - ¼­¸¥³×¹ø°³¯ (2005 01 05)

PHP - ¼­¸¥´Ù¼¸¹ø°³¯ (2005 01 06)

PHP - ¼­¸¥¿©¼¸¹ø°³¯ (2005 01 07)

PHP - ¼­¸¥ÀÏ°ö¹ø°³¯ (2005 01 10)

PHP - ¼­¸¥¿©´ú¹ø°³¯ (2005 01 11)

PHP - ¼­¸¥¾ÆÈ©¹ø°³¯ (2005 01 12)

PHP - ¸¶Èç¹ø°³¯ (2005 01 13)

PHP - ¸¶ÈçÇѹø°³¯ (2005 01 14)

PHP - ¸¶ÈçµÎ¹ø°³¯ (2005 01 17)

PHP - ¸¶Èç¼¼¹ø°³¯ (2005 01 18)

PHP - ¸¶Èç³×¹ø°³¯ (2005 01 19)



 


 


PHP - ¿­ÇÏ·ç°³¯ (1203)
-°Ô½ÃÆÇ(4) - 1.2.3.4 ÃÑÁ¤¸®ÆÇ(»ùÀÚ·á)


¢Ì °Ô½ÃÆǸ¸µé±â
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
--- ÆÄÀϸí: connect.php -------------
<?
$connect=mysql_connect(localhost,apple,123456);
$db=mysql_select_db(appledb,$connect);
?>



:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
--- ÆÄÀϸí: board1db.php -------------
<?
include connect.php;


$query=create table board1(
  num int not null auto_increment primary key,
  name varchar(20) not null,
  email varchar(30) not null,
  hpage varchar(50) not null,
  subject varchar(70) not null,
  content text not null,
  dbpass varchar(20) not null,
  userip varchar(30) not null,
  reg_date date not null,
  cnt int not null);
$result=mysql_query($query) or die(mysql_error());
if($result){
 echo °Ô½ÃÆÇ Å×ÀÌºí »ý¼º ¼º°ø!;
}else {
 echo °Ô½ÃÆÇ Å×ÀÌºí »ý¼º ½ÇÆÐ!;
}
?>


 


 


:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
--- ÆÄÀϸí: list.html -------------
<html>


<head>
<style type= ext/css>
a {text-decoration:none;}
.my1 {font-weight: bold; color:olive;}
</style>
</head>


<body>
<br>
<font color=#006666 size=5><b>
MyBoard Ver 1.0
</b></font>
<br>
<table border=1 width=700>
<tr class=my1 >
 <td>¹ø È£</td>
 <td>Á¦ ¸ñ</td>
 <td>ÀÌ ¸§</td>
 <td>µî·Ï³¯Â¥</td>
 <td>Á¶È¸¼ö</td>
</tr>
<?
include connect.php;
$query=select * from board1 order by num desc;
$result=mysql_query($query);
while($row=mysql_fetch_array($result)){
echo <tr>
   <td>$row[num]</td>
   <td><a href=view.html?num=$row[num]>$row[subject]</a></td>
   <td>$row[name]</td>
   <td>$row[reg_date]</td>
   <td>$row[cnt]</td>
 </tr>;
}
?>
</table>
<br>
<a href=write.html>±Û¾²±â</a>
</body>
</html>



:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
--- ÆÄÀϸí: write.html -------------
<html>
<head>
<script>


function check(form) {
 
 if(form.name.value == \) {
  alert(À̸§À» ÀÔ·ÂÇϼ¼¿ä!);
  form.name.focus();
  return false;
 }


 


 if(form.email.value.indexOf(@)<0 || form.email.value.indexOf(.)<0){
     alert(À̸ÞÀÏ Çü½Ä¿¡ ¸Â°Ô ÀÔ·ÂÇϼÀ!!!);
  form.email.focus();
  return false;
 }


  if(form.hpage.value.length <= 7) {
   alert(ȨÆäÀÌÁö¸¦ ÀÔ·ÂÇϼ¼¿ä!);
   form.hpage.focus();
   return false;
  }


 


  if(form.subject.value == \) {
  alert(Á¦¸ñÀ» ÀÔ·ÂÇϼ¼¿ä!);
  form.subject.focus();
  return false;
 }
 if(form.content.value == \) {
  alert(³»¿ëÀ» ÀÔ·ÂÇϼ¼¿ä!);
  form.content.focus();
  return false;
 }


 if(form.dbpass.value == \) {
  alert(ºñ¹Ð¹øÈ£¸¦ ÀÔ·ÂÇϼ¼¿ä!);
  form.dbpass.focus();
  return false;
 }


 


 


  


 form.submit();


}



</script>
</head>
<body>
<br>
±Û¾²±â
<br>
<form  name=form method=post action=write.php>
<table border=1 width=600>
<tr>
 <td>ÀÌ ¸§</td>
 <td><input type=text name=name></td>
</tr>
<tr>
 <td>À̸ÞÀÏ</td>
 <td><input type=text name=email></td>
</tr>
<tr>
 <td>ȨÆäÀÌÁö</td>
 <td><input type=text name=hpage value=http://></td>
</tr>
<tr>
 <td>Á¦ ¸ñ</td>
 <td><input type=text name=subject size=50></td>
</tr>
<tr>
 <td>³» ¿ë</td>
 <td><textarea name=content rows=10 cols=60></textarea></td>
</tr>
<tr>
 <td>ºñ¹Ð¹øÈ£</td>
 <td><input type=password name=dbpass></td>
</tr>
<tr>
 <td colspan=2 align=center>
 <input type=button onClick=check(this.form) value=Àü¼Û >
 &nbsp;&nbsp;&nbsp;
 <input type=reset value=Ãë¼Ò>
 </td>
</tr>
</table>
</form>
</body>
</html>


:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
--- ÆÄÀϸí: write.php -------------
<?
if($name == \ || $email == \ || $hpage == \ || $subject == \ || $content == \ || $dbpass == \) {


 echo <script>
     alert(ºñ¾îÀÖ´Â Ç׸ñÀÌ ÀÖ½À´Ï´Ù);
     location.href=write.html;
    </script>;


 exit;
}


echo ³Ñ¾î¿Â À̸§ : $name<br>;
echo ³Ñ¾î¿Â À̸ÞÀÏ : $email<br>;
echo ³Ñ¾î¿Â ȨÆäÀÌÁö : $hpage<br>;
echo ³Ñ¾î¿Â Á¦¸ñ : $subject<br>;
echo ³Ñ¾î¿Â ³»¿ë : $content<br>;
echo ³Ñ¾î¿Â ºñ¹Ð¹øÈ£ : $dbpass<br>;


$user_ip=getenv(REMOTE_ADDR);


echo user_ip --- $user_ip<br>;


include connect.php;
$query=insert into board1 values(NULL,$name,$email,$hpage,$subject,$content,$dbpass,$user_ip,now(),0);


 


$result=mysql_query($query);
if($result){
 echo ÀÔ·Â ¼º°ø;
}else {
 echo ÀÔ·Â ½ÇÆÐ;
}


echo <meta http-equiv=refresh content= url=list.html>;


?>



:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
--- ÆÄÀϸí: modify.html -------------
<html>
<head>
<script>


function check(form) {
 
 if(form.name.value == \) {
  alert(À̸§À» ÀÔ·ÂÇϼ¼¿ä!);
  form.name.focus();
  return false;
 }


 


 if(form.email.value.indexOf(@)<0 || form.email.value.indexOf(.)<0){
     alert(À̸ÞÀÏ Çü½Ä¿¡ ¸Â°Ô ÀÔ·ÂÇϼÀ!!!);
  form.email.focus();
  return false;
 }


  if(form.hpage.value.length <= 7) {
   alert(ȨÆäÀÌÁö¸¦ ÀÔ·ÂÇϼ¼¿ä!);
   form.hpage.focus();
   return false;
  }


 


  if(form.subject.value == \) {
  alert(Á¦¸ñÀ» ÀÔ·ÂÇϼ¼¿ä!);
  form.subject.focus();
  return false;
 }
 if(form.content.value == \) {
  alert(³»¿ëÀ» ÀÔ·ÂÇϼ¼¿ä!);
  form.content.focus();
  return false;
 }


 if(form.dbpass.value == \) {
  alert(ºñ¹Ð¹øÈ£¸¦ ÀÔ·ÂÇϼ¼¿ä!);
  form.dbpass.focus();
  return false;
 }


 


 


  


 form.submit();


}



</script>
</head>
<body>
<?
echo ±Û¹øÈ£ --- $num<br>;
echo userpass --- $userpass<br>;


include connect.php;
$query=select dbpass from board1 where num=$num\;


$result=mysql_query($query);
$dbpass=mysql_result($result,0,0);


echo dbpass --- $dbpass<br>;


if(strcmp($userpass,$dbpass)){
 echo <script>
   alert(ºñ¹Ð¹øÈ£°¡ Ʋ¸³´Ï´Ù!);
   history.back();
  </script>;
 exit;
}


$query=select * from board1 where num=$num\;
$result=mysql_query($query);
$row=mysql_fetch_array($result);
?>



<br>
¼öÁ¤Çϱâ
<br>
<form  name=form method=post action=modify.php?num=<?echo $num;?>>
<table border=1 width=600>
<tr>
 <td>ÀÌ ¸§</td>
 <td><input type=text name=name value=<?echo $row[name];?>></td>
</tr>
<tr>
 <td>À̸ÞÀÏ</td>
 <td><input type=text name=email value=<?echo $row[email];?>></td>
</tr>
<tr>
 <td>ȨÆäÀÌÁö</td>
 <td><input type=text name=hpage value=<?echo $row[hpage];?>></td>
</tr>
<tr>
 <td>Á¦ ¸ñ</td>
 <td><input type=text name=subject size=50 value=<?echo $row[subject];?>></td>
</tr>
<tr>
 <td>³» ¿ë</td>
 <td><textarea name=content rows=10 cols=60><?echo $row[content];?></textarea></td>
</tr>
<tr>
 <td>ºñ¹Ð¹øÈ£</td>
 <td><input type=password name=dbpass></td>
</tr>
<tr>
 <td colspan=2 align=center>
 <input type=button onClick=check(this.form) value=Àü¼Û >
 &nbsp;&nbsp;&nbsp;
 <input type=reset value=Ãë¼Ò>
 </td>
</tr>
</table>
</form>
</body>
</html>


:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
--- ÆÄÀϸí: modifycheck.html -------------
<html>
<body>
<br>
modifycheck.html
¼öÁ¤
list.html->view.html->modifycheck.html->modify.html->modify.php
±Û¹øÈ£  ±Û¹øÈ£    ±Û¹øÈ£            ±Û¹øÈ£       ±Û¹øÈ£



<br>
<form method=post action=modify.html?num=<?echo $num;?>>
<table border=1 width=250>
<tr>
 <td align=center>
 ºñ¹Ð¹øÈ£ È®ÀÎ
 </td>
</tr>
<tr>
 <td align=center>
 <input type=password name=userpass>
 </td>
</tr>
<tr>
 <td align=center>
 <input type=submit value=È®ÀÎ>
 </td>
</tr>
</form>
</body>
</html>


:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
--- ÆÄÀϸí: result.php -------------
<?
//ÆÄÀϸí : result.php



include connect.php;
$query=select * from board1 order by num desc;


$result=mysql_query($query);


$data1=mysql_result($result,0,0);//ù¹øÀç Çà ù¹ø° ¿­
$data2=mysql_result($result,0,1);
$data3=mysql_result($result,0,2);
$data4=mysql_result($result,1,0); //µÎ¹ø° Çà ù¹ø° ¿­
$data5=mysql_result($result,1,1);
$data6=mysql_result($result,1,2);


echo data1 --- $data1<br>;
echo data2 --- $data2<br>;
echo data3 --- $data3<br>;
echo data4 --- $data4<br>;
echo data5 --- $data5<br>;
echo data6 --- $data6<br>;
?>


:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
--- ÆÄÀϸí: view.html -------------
<html>
<body>
<br>
<br>
<?
echo ³Ñ¾î¿Â ±Û¹øÈ£ --- $num<br>;
include connect.php;
//Á¶È¸¼ö Áõ°¡
$query=update board1 set cnt=cnt+1 where num=$num\;
$result=mysql_query($query);


$query=select * from board1 where num=$num\;
$result=mysql_query($query);
$row=mysql_fetch_array($result);
$content=nl2br($row[content]);
?>
<table border=1 width=700>
<tr>
 <td>ÀÌ ¸§</td>
 <td><?= $row[name];?>&nbsp;</td>
 <td>Á¶È¸¼ö</td>
 <td><?= $row[cnt];?>&nbsp;</td>
</tr>
<tr>
 <td>À̸ÞÀÏ</td>
 <td><?echo $row[email];?>&nbsp;</td>
 <td>ȨÆäÀÌÁö</td>
 <td><?echo $row[hpage];?>&nbsp;</td>
</tr>
<tr>
 <td>Á¦ ¸ñ</td>
 <td colspan=3><?echo $row[subject];?>&nbsp;</td>
</tr>
<tr>
 <td colspan=4 height=200>  
 <?echo $content;?>&nbsp;
 </td>
</tr>
<tr>
 <td>±Û¾´³¯Â¥</td>
 <td><?echo $row[reg_date];?>&nbsp;</td>
 <td>Á¢¼ÓIP</td>
 <td><?echo $row[userip];?>&nbsp;</td>
</tr>
</table>
<br>
<a href=list.html>¸®½ºÆ®</a>
&nbsp;&nbsp;
<a href=modifycheck.html?num=<?echo $num;?>>¼ö Á¤</a>
&nbsp;&nbsp;
<a href=deletecheck.html?num=<?echo $num;?>>»è Á¦</a>



</body>
</html>



:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::


 


 



¢Ç¢Ç¢Ç¢Ç¢Ç¢Ç¢Ç¢Ç¢Ç¢Ç¢Ç¢Ç¢Ç¢Ç¢Ç¢Ç¢Ç¢Ç¢Ç¢Ç¢Ç¢Ç¢Ç¢Ç¢Ç¢Ç¢Ç¢Ç¢Ç¢Ç¢Ç¢Ç¢Ç¢Ç


¢Ì PHP ÀÌ·Ð
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
--- ÆÄÀϸí: for1.php -------------



:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
--- ÆÄÀϸí: for2.php -------------
<?


for($i=1;$i<=5;$i++){
 for($j=1;$j<=3;$j++){
  echo $i --- $j<br>;
 }
 echo <hr>;
}


echo <br><br>;
for($i=2;$i<=9;$i++){
 for($j=1;$j<=9;$j++){
  $result=$i * $j;
  echo $i * $j = $result<br>;
 }
 echo <hr>;
}


?>


:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
--- ÆÄÀϸí: or.php -------------
<?


//³í¸® ¿¬»êÀÚ  OR : ||  AND : &&
//°ü°è ¿¬»êÀÚ < > == !=
$a=0 || 0;
$b=0 || 1;
$c=1 || 0;
$d=1 || 1;


echo a --- $a<br>;
echo  --- $b<br>;
echo c --- $c<br>;
echo d --- $d<br>;
echo <br>======================<br>;


$a=0 && 0;
$b=0 && 1;
$c=1 && 0;
$d=1 && 1;
echo a --- $a<br>;
echo  --- $b<br>;
echo c --- $c<br>;
echo d --- $d<br>;
?>


 


:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
--- ÆÄÀϸí: or.php -------------



:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
--- ÆÄÀϸí: or2.php -------------
<?


$a=0;


$b=0;


$c=(0 or 10);


echo c --- $c<br>;


?>


:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
--- ÆÄÀϸí: str.php -------------
<?


$a=Hel;
$b=helo;


$c=strcmp($a,$b);


echo c --- $c<br>;


?>


:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
--- ÆÄÀϸí: strcmp.php -------------
<?


//ÆÄÀϸí : strcmp.php


$a=Hello;
$b=Opple;


$c=strcmp($a,$b);


echo c --- $c<br>;


$b=Hello;


$c=strcmp($a,$b);


echo c --- $c<br>;


?>


:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
--- ÆÄÀϸí: getenv.html -------------
<html>
<body>
ÆÄÀϸí : getenv.html
<br>
<form method=get action=getenv.php>
ÀÌ ¸§ : <input type=text name=name>
<br>
À̸ÞÀÏ : <input type=text name=email>
<br>
<input type=submit value=Àü¼Û>
</form>
</body>
</html>
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
--- ÆÄÀϸí: getenv.php -------------
<CENTER></CENTER><?
/*
ÆÄÀϸí : getenv.php


string getenv(String varName)



getenv ÇÔ¼ö : ÀÎÀÚ·Î Àü´ÞÇÑ È¯°æº¯¼ö¿¡ ÀúÀåµÇ¾î ÀÖ´Â
°ªÀ» ¹ÝȯÇÑ´Ù.
ȯ°æº¯¼öÀÇ ³»¿ëÀº phpinfo() ÇÔ¼ö¸¦ È£ÃâÇÏ¸é º¼ ¼ö ÀÖ´Ù.
*/


echo <font color=blue><b>À¥¼­¹ö À̸§°ú ¹öÀü</b></font><br>;
echo getenv(SERVER_SOFTWARE) . <br>;


echo <font color=blue><b>¼­¹öÀÇ È£½ºÆ® À̸§</b></font><br>;
echo getenv(SERVER_NAME) . <br>;


echo <font color=blue><b>¼­¹öÀÇ ÇÁ·ÎÅäÄÝ http 1.0 or http 1.1</b></font><br>;
echo getenv(SERVER_PROTOCOL) . <br>;


echo <font color=blue><b>Ŭ¶óÀ̾ðÆ® ¿äûÀ» º¸³»´Â Æ÷Æ®¹øÈ£</b></font><br>;
echo getenv(SERVER_PORT) . <br>;


echo <font color=blue><b>µ¥ÀÌÅ͸¦ Àü¼ÛÇÏ´Â ¹æ¹ý GET or POST</b></font><br>;
echo getenv(REQUEST_METHOD) . <br>;


echo <font color=blue><b>GET ¹æ½ÄÀ» ÅëÇؼ­ Àü´ÞµÈ °ªÀ» ÀúÀå</b></font><br>;
echo getenv(QUERY_STRING) . <br>;


echo <font color=blue><b>POST ¹æ½ÄÀ» ÅëÇØ Àü´ÞµÈ ÀÔ·ÂÁ¤º¸ÀÇ ±æÀÌ</b></font><br>;
echo getenv(CONTENT_LENGTH) . <br>;


echo <font color=blue><b>½ºÅ©¸³Æ® ½ÇÇàÀ» ¿äûÇÑ ºê¶ó¿ìÀú Á¾·ù ¹× ¹öÀü</b></font><br>;
echo getenv(HTTP_USER_AGENT) . <br>;


?>


:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
--- ÆÄÀϸí: table.html -------------
<html>
<body>
<?
$conn=mysql_connect(localhost,apple,123456) or die(DB not connected!);
$db=mysql_select_db(appledb) or die(DB not selected);


$query=select * from board1;
$result=mysql_query($query);
$fieldCount=mysql_num_fields($result);
//Ä÷³ÀÇ °¹¼ö¸¦ ¼¼¾îÁÖ´Â ÇÔ¼ö
?>
<h1>Å×À̺íÀÇ ¼Ó¼ºÀ» ¾Ë¾Æ¿É´Ï´Ù.</h1>
<table border=1 bordercolor=#9966CC bordercolorlight=#FFFF66 cellpadding=1 cellspacing=0>
<tr>
 <td bgcolor=#A8A8A8>Ä÷³À̸§</td>
 <td bgcolor=#B8B8B8>Ä÷³Å¸ÀÔ</td>
 <td bgcolor=#C8C8C8>Ä÷³Å©±â</td>
 <td bgcolor=#E8E8E8>Ä÷³¼Ó¼º</td>
 <td bgcolor=#F8F8F8>¼Ò¼ÓÅ×À̺í</td>
</tr>
<?
//Ä÷³ÀÇ °¹¼ö¸¦ ¹Þ¾Æ¿Í¼­ ±× ¼ö¸¸Å­ for ¹®À» µ¹·ÁÁØ´Ù.
for($i=0;$i<$fieldCount;$i++){
 $fieldName=mysql_field_name($result,$i);
//°¢ ÇʵåÀÇ À̸§À» °¡Á®¿Â´Ù.
 $fieldType=mysql_field_type($result,$i);
//°¢ ÇʵåÀÇ Å¸ÀÔÀ» °¡Á®¿Â´Ù. 
 $fieldLength=mysql_field_len($result,$i);
//°¢ ÇʵåÀÇ ±æÀ̸¦ °¡Á®¿Â´Ù. 
 $fieldFlags=mysql_field_flags($result,$i);
//°¢ ÇʵåÀÇ ¼Ó¼ºÀ» °¡Á®¿Â´Ù. 
 $fieldTable=mysql_field_table($result,$i);
//°¢ Çʵ尡 ¼ÓÇÑ Å×À̺íÀÇ À̸§À» °¡Á®¿Â´Ù.
 echo <tr>
    <td>$fieldName</td>
    <td>$fieldType</td>
    <td>$fieldLength</td>
    <td>$fieldFlags</td>
    <td>$fieldTable</td>
    </tr>;
 }
?>
</table>
</body>
</html>


 


:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::


PHP½ºÅ͵𠠠 2004   12   03


ÀÚ·á¼Ò½º ÀÚ¼¼È÷ Á¤È®ÇÏ°Ô º¸±â
http://www.6VJ.com/php/php1203.txt


´õÀÚ¼¼È÷º¸±â´Â ±×¾È¿¡¼­ ¿À¸¥Âʸ¶¿ì½º·Î ¼Ò½ºº¸±âÇϼ¼¿ä.

Home| Á¤Ä¡| ±¹Á¦| »çȸ| °æÁ¦| ÈÞ¸Õ| ÀÚ¿¬| µ¿¹°| ¿ª»ç| ±â·Ï| °Ç°­| °úÇÐ| Àü½Ã| °¶·¯¸®| ¹Ú¹°°ü| ½ºÅ¸| °¡¼ö| ¹è¿ì| ÅÅ·±Æ®| ¸ðµ¨| µ¥ºß| ¹®ÀÎ| ¼­Àû| ¿¬±Ø| À½¾Ç| ¹Ì½½| ±³À° »ç´ÂÀ̾߱â | ¿µÈ­| ¾ð·Ð| ¿©Çà| Ã¥µ¿³×| Æ÷Åä°¶·¯¸®| e±â»ç´Â ³íÀïÁß ±¤ÁÖÀü³²| ´ë±¸°æºÏ| ÀüºÏÈñ¸Á| Àü³²µ¿ºÎ| ºÎ»ê°æ³²| ´ëÀüÃæ³²| ¹ÌÁÖ¼Ò½Ä| ¾Æ½Ã¾Æ| À¯·´ 6VJ-TV| ºñµð¿À Àú³Î¸®½ºÆ®(PD) ºñµð¿ÀÀú³Î¸®½º³×Æ®¿öÅ© ºñµð¿ÀÀú³Î¸®½ºÇùȸ ±âÀÚ¸¸µé±â | 6VJ°Ô½ÃÆÇ | °ø°³ÆíÁýȸÀÇ ¹æ¼ÛÆíÁýȸÀÇ
  6VJ ÀÌ¿ë ¾à°ü °³ÀÎÁ¤º¸ º¸È£Á¤Ã¥ ÀÎÅͳݾð·ÐÆíÁýȸÀÇ Contact Us    
  Copyright © 2003 by 6VJ.com All rights reserved [ºñµð¿ÀÀú³Î¸®½ºÆ® ³×Æ®¿öÅ© / À¥¸ÖƼĿ¹Â´ÏÄÉÀ̼Ç]
»ó È£: ºñµð¿ÀÀú³Î¸®½ºÆ®¡ºVJ¡»[õ±¹Ä¿¹Â´ÏÄÉÀ̼Ç]
°¨µ¶¡£ÀÌ ±â ¿ë     email: Lee@KY.co.kr
Àü±¹´ëÇ¥¹øÈ£: °í°´¼­ºñ½º-ÀüÁö¿ª
¢Ï1544¢¾0404
 
(4¶ûÇؿ䢾¿µ»ç¿µ»ç:2006.03.01~¼­ºñ½º¢Ñ¹æ¼ÛÁ¦ÀÛ ¹× ¹æ¼ÛÁ¦º¸)

¹æ¼Û: KBS MBC SBS CableTV
±¤°í: Business Product_CF AD
IT: WebProgram Design
BtoB: BusinessNetwork. WebBusinessConsulting
    ¸ð¹ÙÀÏ : 010 - 3079 - 1009   (050-2221-1009: Æò»ý¹øÈ£)
    ´ë Ç¥ :  02) 2202 - 1009   |  (050-2222-1009)
    ±â ȹ :  031) 709 - 1009   |  (050-2223-1009)
    Á¦ ÀÛ :  031) 707 - 1009   |  (050-2224-1009)
    ÆÑ ½º :  031) 702 - 1009   |  (050-2225-1009)
    ÆÑ ½º :  031) 758 - 1009   |  (050-2226-1009)
    ¢ÀÆò»ý¹øÈ£(050)´Â º¸¸§µ¿¾È(2007³â1¿ù16ÀÏ~) ½ÃÇè¹æ¼Û°ü°è·Î ¼­ºñ½º¿¡ È¥µ¿À» µå¸± ¼ö ÀÖÀ¸´Ï ÀÌ¿ëÇÏÁö ¸¶½Ã±æ ¹Ù¶ø´Ï´Ù.(Æò»ó½Ã¿¡´Â ÀϹÝÀüÈ­¿Í µ¿ÀÏÇÏ°Ô »ç¿ëµË´Ï´Ù.)
¿ì Æí: 463-839.°æ±âµµ ¼º³²½Ã ºÐ´ç±¸ ¾ßžµ¿526¹øÁö °æ³²¾ÆÆÄÆ®»ó°¡.ÄÄ¾Ø³Ý º¥Ã³¿ÀÇǽº 111È£ õ±¹Ä¿¹Â´ÏÄÉÀ̼Ç
¡¼ºñµð¿ÀÀú³Î¸®½ºÆ®-6VJ.com¡½ ºñµð¿ÀÀú³Î¸®½ºÆ® (ÇÁ¸®·»¼­ ÇÁ·Îµà¼­µéÀÇ ³×Æ®¿öÅ© À¥¸ÖƼĿ¹Â´ÏÄÉÀ̼Ç)
::::::: ¿ì¸®°¡ »ì¾Æ°¡´Â À̼¼»ó¿¡¼­ »ç¶û°ú Çູ ȤÀº ¹Ì¿ò°ú ½½ÇÄÀÌ Á¸ÀçÇÏ´Â À̼¼»óÀ» ¹Ù¶óº¼ ¼ö ÀÖ´Â ³»°¡ ÇöÀç ¼û½¬°í ÀÖ´Â µ¿¾È¿¡
Á¸ÀçÇÏ´Â ¼¼»ó°ú ´õºÒ¾î ¿ìÁÖ¼Ó¿¡ ¸ÕÁö¿Í °°ÀÌ µ¹°íµµ´Â À̼¼»óÀÌ Ãµ±¹ÀÔ´Ï´Ù. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::