½ÃÀÛÆäÀÌÁö·Î Áñ°Üã±âÃß°¡
·Î±×ÀÎ
ȸ¿ø°¡ÀÔ l Ã⼮üũ l ¸¶ÀÌÆäÀÌÁö l CGIMALL
ÀÚ·á½Ç »çÀÌÆ®µî·Ï ·©Å·100 ÇÁ·Î±×·¥¸®ºä °ü¸®ÀÚÃßõÀÚ·á Ãʺ¸°¡À̵å
Ä¿¹Â´ÏƼ
Àüü ÆîÃ帱â
Äü¸Þ´º¸µÅ© jquery , CSS , PHP , Javascript , ¹«·áÆùÆ® , ASP
»ó¼¼°Ë»ö
Ȩ > Ä¿¹Â´ÏƼ > Áú¹®°ú´äº¯ »ó¼¼º¸±â
Ä¿¹Â´ÏƼ ±¸Àα¸Á÷
»çÀÌÆ®µî·Ï
Ŭ¶ó¿ìµåű×
Javascript
PHP
asp
CSS
html
mysql
jquery
image
Mobile
API
slide
°Ô½ÃÆÇ
¸Þ´º
ÇöÀçÁ¢¼ÓÀÚ ¸í »õ·Î°íħ
°Ô½ÃÆÇŸÀÌƲ Áú¹®°ú´äº¯ / »ó¼¼º¸±â
Æ®À§ÅÍ·Î º¸³»±â
Ãßõ¼ö 209 | Á¶È¸¼ö 4,498 | µî·ÏÀÏ 2007-06-02 21:05:21

´Ð³×ÀÓ

bokgo1999

À̸ÞÀÏ

bokgo1999@hanmail.net

Á¦¸ñ

c¸¦ ÀÌ¿ëÇÑ cgi ÇÁ·Î±×·¥ ½ÇÇà¿¡ ´ëÇÑ Áú¹®ÀÔ´Ï´Ù Á¦¹ß ´äº¯ ºÎŹµå·Á¿ä.
³»¿ë
¾È³çÇϼ¼¿ä Á¦°¡ ¿À´Ã óÀ½ À¥ÇÁ·Î±×·¥À» Â¥°Ô µÇ¾ú´Âµ¥ cgi´Â Á¤º¸°¡ ¸¹ÀÌ ºÎÁ·ÇÑ°Å °°³×¿ä.
ÀÓº£µðµå º¸µå¿¡¼­ ±¸µ¿½Ãų º¸¾Æ À¥¼­¹ö¸¦ ±¸µ¿ÇÏ¿© È£½ºÆ® ÇǾ¾¿¡¼­ À¥¼­¹ö¿¡ Á¢¼ÓÇÏ¿© requestÇÏ´Â ±¸Á¶ÀÔ´Ï´Ù.

OS: fedora core 5
½Ã½ºÅÛ ±¸Á¶: "Ŭ¶óÀ̾ðÆ® <=> ¼­¹ö <=> cgiÇÁ·Î±×·¥(c¾ð¾î)"
server ÁÖ¼Ò: http://192.168.1.50

index.html: Ŭ¶óÀ̾ðÆ®°¡ ÇÊ¿äÇÑ Á¤º¸¸¦ ÀÔ·ÂÇÏ´Â html
<HTML>

Motor Control



<FORM METHOD=post ACTION="/cgi-bin/motor.cgi">

Rotate Degree(0~180): <INPUT NAME=degree SIZE=10>
<INPUT TYPE=hidden NAME=hiddenvalue VALUE="hidden value"> <!-- ¨ì -->



SPEED(0~255): <INPUT NAME=speed SIZE=10>


<INPUT TYPE=submit VALUE=SUBMIT>
<INPUT TYPE=reset VALUE=RESET>
</FORM>
</HTML>

motor.c Ŭ¶óÀ̾ðÆ®°¡ Ŭ¶óÀ̾ðÆ®°¡ submitÇÏ¸é ¼öÇàµÉ c ÇÁ·Î±×·¥
#include
int main() {
printf("Content-type: text/html\n\n");

printf(
"<html>\n<body>\n"
"<script language=\"javascript\">\n"
"location.href=\"http://192.168.1.50/index.htm\"\n"
"</script>\n</body>\n</html>\n");
return 0;
}

(1)http://192.168.1.50/index.htm ½ÇÇà
submitÀ» ÇÏ°Ô µÇ¸é FORMÀÇ action¿¡ ÀûÇôÁø °æ·ÎÀÇ cgi¸¦ ½ÇÇàÇÏ¿© ±×°á°ú¸¦ Ŭ¶óÀ̾ðÆ®¿¡ ¹ÝȯÇؾßÇϴµ¥ cgiÇÁ·Î±×·¥ÀÌ ½ÇÇàµÇÁö¸¦ ¾Ê°í "opening motor.cgi"¶ó´Â cgiÆÄÀÏÀ» ÀúÀåÇÒÁö ¿­Áö¸¦ ¹¯´Â ¸Þ½ÃÁö°¡ ¶ß³×¿ä.

(2)http://192.168.1.50/cgi-bin/motor.cgi ½ÇÇà
¿Ã¹Ù¸¥ ¼öÇàÀÌ ÀÌ·ç¾î Áý´Ï´Ù.

(1)¿¡¼­ÀÇ ¹®Á¦°¡ ¸Õ°¡¿ä?? ´äº¯ ºÎŹµå·Á¿ä.
Ãßõ½ºÅ©·¦¼Ò½ºº¸±â ¸ñ·Ï
rhtjralsha 2007-06-07 10:44:01
´ä±Û

printf("Content-type: text/html

");
printf("<html>
<body>
");
printf("<script language="javascript">
");
printf("location.href="http://192.168.1.50/index.htm"
");
printf("</script>
</body>
</html>
");
ÀÌ·¸ÄÉ ÇÔÇغ¸½ÃÁÒ

rhtjralsha 2007-06-07 10:44:45
´ä±Û

¾î¶ó ÀÌ»óÇÏ°Ô µé¾î°¡졋³ß

ÀÌÀü°Ô½Ã±Û DIVÀ§ÀÇ onmouseover/out 2007-05-28 18:44:56
´ÙÀ½°Ô½Ã±Û À̹ÌÁö °¶·¯¸® ¼Ò½º ¼öÁ¤¿¡ ´ëÇÑ Á¶¾ð ºÎŹ¸»¾¸ 2007-06-14 02:48:54