{"id":585,"date":"2016-07-24T21:41:33","date_gmt":"2016-07-24T12:41:33","guid":{"rendered":"http:\/\/sarang.inmu.net\/?p=585"},"modified":"2020-06-03T10:24:07","modified_gmt":"2020-06-03T01:24:07","slug":"%ed%8f%bc%ec%97%90%ec%84%9c-input-file-%eb%94%94%ec%9e%90%ec%9d%b8%ed%95%98%ea%b8%b0","status":"publish","type":"post","link":"https:\/\/sarang.inmu.net\/?p=585","title":{"rendered":"\ud3fc\uc5d0\uc11c input file \ub514\uc790\uc778\ud558\uae30"},"content":{"rendered":"<p>\ud3fc\uc744 \ub514\uc790\uc778\ud558\uba74\uc11c input type=file \uc77c\ub54c \ub514\uc790\uc778\ud558\ub294 \ubc29\ubc95\uc774\ub2e4. jquery\ub97c \uc0ac\uc6a9\ud55c\ub2e4.<\/p>\n<p>\uc608\uc81c1)<\/p>\n<p><strong>HTML \ucf54\ub4dc<\/strong><br \/>\n&lt;input type=&#8221;file&#8221; name=&#8221;client_file&#8221; id=&#8221;index_image&#8221; placeholder=&#8221;\uc774 \uacf3\uc5d0 \uc774\ubbf8\uc9c0 \ud30c\uc77c\uc744 \uc785\ub825\ud558\uc138\uc694&#8221; \/&gt;<br \/>\n&lt;label for=&#8221;index_image&#8221;&gt;\uc774 \uacf3\uc5d0\uc11c \uc774\ubbf8\uc9c0 \ud30c\uc77c\uc744 \uc120\ud0dd\ud558\uc138\uc694.&lt;\/label&gt;<\/p>\n<p><strong>CSS \ucf54\ub4dc<br \/>\n<\/strong>label {<br \/>\ndisplay: inline-block;<br \/>\nwidth: 5em;<br \/>\npadding: 0 1em;<br \/>\ntext-align: right;<br \/>\n}<\/p>\n<p>\/* Hide the file input using<br \/>\nopacity <em>\/<br \/>\n[type=file] {<br \/>\nposition: absolute;<br \/>\nfilter: alpha(opacity=0);<br \/>\nopacity: 0;<br \/>\n}<br \/>\ninput, [type=file] + label {<br \/>\nborder: 1px solid #CCC;<br \/>\nborder-radius: 3px;<br \/>\ntext-align: left;<br \/>\npadding: 10px;<br \/>\nwidth: 592px;<br \/>\nmargin: 0;<br \/>\nleft: 0;<br \/>\nposition: relative;<br \/>\n}<br \/>\n[type=file] + label {<br \/>\ntext-align: left;<br \/>\n\/<\/em>left: 7.35em;<em>\/<br \/>\ntop: 0.5em;<br \/>\n\/<\/em> Decorative *\/<br \/>\nbackground: #333;<br \/>\ncolor: #fff;<br \/>\nborder: none;<br \/>\ncursor: pointer;<br \/>\n}<br \/>\n[type=file] + label:hover {<br \/>\nbackground: #3399ff;<br \/>\n}<\/p>\n<p><strong>jquery \ucf54\ub4dc<\/strong><br \/>\n&lt;script&gt;<br \/>\n$(&#8220;[type=file]&#8221;).on(&#8220;change&#8221;,function(){<br \/>\nvar file = this.files[0].name;<br \/>\nvar dflt = $(this).attr(&#8220;placeholder&#8221;);<br \/>\nif($(this).val()!=&#8221;&#8221;){<br \/>\n$(this).next().text(file);<br \/>\n} else {<br \/>\n$(this).next().text(dflt);<br \/>\n}<br \/>\n});<br \/>\n&lt;\/script&gt;<\/p>\n<p>\uc608\uc81c \ud30c\uc77c\uc740 \uc544\ub798\ub97c \ud074\ub9ad<br \/>\n<a href=\"http:\/\/exam.inmu.net\/2020\/010.php\">http:\/\/exam.inmu.net\/2020\/010.php<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\ud3fc\uc744 \ub514\uc790\uc778\ud558\uba74\uc11c input type=file \uc77c\ub54c \ub514\uc790\uc778\ud558\ub294 \ubc29\ubc95\uc774\ub2e4. jquery\ub97c \uc0ac\uc6a9\ud55c\ub2e4. \uc608\uc81c1) HTML \ucf54\ub4dc &lt;input type=&#8221;file&#8221; name=&#8221;client_file&#8221; id=&#8221;index_image&#8221; placeholder=&#8221;\uc774 \uacf3\uc5d0 \uc774\ubbf8\uc9c0 \ud30c\uc77c\uc744 \uc785\ub825\ud558\uc138\uc694&#8221; \/&gt; &lt;label for=&#8221;index_image&#8221;&gt;\uc774 \uacf3\uc5d0\uc11c \uc774\ubbf8\uc9c0 \ud30c\uc77c\uc744 \uc120\ud0dd\ud558\uc138\uc694.&lt;\/label&gt; CSS \ucf54\ub4dc label { display: inline-block; width: 5em; padding: 0 1em; text-align: right; } \/* Hide the file input using opacity \/ [type=file] { position: absolute; filter: &hellip; <a href=\"https:\/\/sarang.inmu.net\/?p=585\" class=\"more-link\">\ub354 \ubcf4\uae30<span class=\"screen-reader-text\"> &#8220;\ud3fc\uc5d0\uc11c input file \ub514\uc790\uc778\ud558\uae30&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[5],"tags":[50,49],"class_list":["post-585","post","type-post","status-publish","format-standard","hentry","category-5","tag-file","tag-form"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":750,"url":"https:\/\/sarang.inmu.net\/?p=750","url_meta":{"origin":585,"position":0},"title":"\ud654\uba74\uc758 \ud06c\uae30, CSS, Javascript \uadf8\ub9ac\uace0 php","author":"sarang","date":"2017\ub144 01\uc6d4 20\uc77c","format":false,"excerpt":"\uc6f9\uc791\uc5c5\uc744 \ud558\ub2e4 \ubcf4\uba74 \uac00\ub054 \uc0ac\uc6a9\uc790\uc758 \ud654\uba74 \ud06c\uae30\ub97c \uc54c\uace0 \uc2f6\uc744 \ub54c\uac00 \uc788\ub2e4. \ub514\uc790\uc778\uc801\uc778 \uce21\uba74\uc5d0\uc11c \ud574\uc0c1\ub3c4\uc5d0 \ub530\ub77c\uc11c \ub2e4\ub978 \ud06c\uae30\ub098 \ub0b4\uc6a9\uc744 \ubcf4\uc5ec \uc904 \uc218 \uc788\ub294\ub370 \uc694\uc998\uc740 CSS\ub97c \uc0ac\uc6a9\ud558\uc5ec \ube0c\ub77c\uc6b0\uc800\uc758 \ud06c\uae30\uc5d0 \ub530\ub77c\uc11c \ub2e4\ub978 \ub514\uc790\uc778\uc744 \ubcf4\uc5ec \uc8fc\uace4\ud55c\ub2e4. \ubcf4\ud1b5 \ucf54\ub4dc\ub294 \uc544\ub798\uc640 \uac19\ub2e4. \uc704\uc640 \uac19\uc740 \ucf54\ub4dc\ub97c \uc774\uc6a9\ud558\uba74 \uc0ac\uc6a9\uc790\uc758 \ud654\uba74 \ud06c\uae30\uc5d0 \ub530\ub77c\uc11c \ub2e4\ub978 \ub514\uc790\uc778 \uc801\uc6a9\uc774 \uac00\ub2a5\ud558\ub2e4. \ub110\ub9ac \uc54c\ub824\uc838\u2026","rel":"","context":"&quot;\ucef4\ud4e8\ud130&quot;\uc5d0\uc11c","block_context":{"text":"\ucef4\ud4e8\ud130","link":"https:\/\/sarang.inmu.net\/?cat=5"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":619,"url":"https:\/\/sarang.inmu.net\/?p=619","url_meta":{"origin":585,"position":1},"title":"css3","author":"sarang","date":"2016\ub144 09\uc6d4 09\uc77c","format":false,"excerpt":"\ucd5c\uadfc \ud648\ud398\uc774\uc9c0 \uc791\uc5c5\uc744 \ud558\uba74\uc11c css \ub54c\ubb38\uc5d0 \uc9c4\ud589\uc774 \uc548\ub418\uace0 \uc788\ub2e4. \uacfc\uac70\uc5d0\ub294 \ud14c\uc774\ube14\ub85c \ub808\uc774\uc544\uc6c3\uc744 \uc7a1\uc558\ub294\ub370, \uc694\uc998 \uadf8\ub7f0 \uc2dd\uc73c\ub85c \ud654\uba74\uc744 \ub9cc\ub4e4\uba74 \uc2dc\ub300\uc5d0 \ub4a4\ub5a8\uc5b4\uc9c4\ub2e4. \ubb34\uc5c7\uc774\ub4e0 \uc2dc\ub300\uc5d0 \uac78\ub9de\uac8c \uc791\uc5c5\ud558\ub294 \uac8c \ubc14\ub78c\uc9c1 \ud558\ub2e4. \ub808\uc774 \uc544\uc6c3\uc5d0\uc11c \uc911\uc694\ud558\ub2e4\uace0 \uc0dd\uac01 \ub418\ub294 \uba87 \uac00\uc9c0 \uc694\uc810\uc744 \uc774 \uacf3\uc5d0 \uc815\ub9ac\ud558\uc5ec \ucc38\uc870 \ud558\uc790. \u00a0 display \uc18d\uc131\uc5d0\uc11c inline \uacfc inline-block \uc758 \ucc28\uc774\uc810 \uc608\uc81c \uc704\uc758\u2026","rel":"","context":"&quot;\ucef4\ud4e8\ud130&quot;\uc5d0\uc11c","block_context":{"text":"\ucef4\ud4e8\ud130","link":"https:\/\/sarang.inmu.net\/?cat=5"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":902,"url":"https:\/\/sarang.inmu.net\/?p=902","url_meta":{"origin":585,"position":2},"title":"ajax\ub97c \uc0ac\uc6a9\ud574\uc11c \uc11c\ubc84\uc758 \uc2dc\uac04\uc744 \ubcf4\uc5ec \uc8fc\uae30","author":"sarang","date":"2017\ub144 12\uc6d4 16\uc77c","format":false,"excerpt":"\uc790\ubc14\uc2a4\ud06c\ub9bd\ud2b8\uc5d0\uc11c setInterval() \uc744 \uc774\uc6a9\ud558\uba74 \uc9c0\uc815\ud55c \ubc00\ub9ac\uc138\ucee8\ub4dc \ub2e8\uc704\ub85c \ubb34\uc5b8\uac00\ub97c \uc2e4\ud589\ud560 \uc218 \uc788\ub2e4. \uc774 \ud568\uc218\uc5d0 ajax\ub97c \ub123\uc5b4\uc11c 1\ucd08\uc5d0 \ud55c\ubc88 \uc529 \uc2e4\ud589\ub418\uac8c \ud55c\ub2e4\uba74 \uc11c\ubc84\uc758 \uc2dc\uac04\uc744 \ube0c\ub77c\uc6b0\uc800\ub85c \ubcf4\ub0bc \uc218 \uc788\ub2e4. \uc11c\ubc84\uc5d0\uc11c \ud560 \uc77c\uc740 php\uc758 date()\ud568\uc218\uc640 time() \ud568\uc218\ub97c \uc774\uc6a9\ud574\uc11c \uc2e4\uc2dc\uac04\uc744 echo\ud558\uba74 \ub41c\ub2e4. \uc774 \uc608\uc81c\uc5d0\uc11c\ub294 util.php?mode=nowTime \ub9c1\ud06c\uc5d0\uc11c \uad6c\ud604\ud558\uc600\ub2e4. util.php \uc758 \ucf54\ub4dc \ub0b4\uc6a9\uc740 \uc544\ub798\uc640 \uac19\ub2e4. <?php $mode\u2026","rel":"","context":"&quot;\ucef4\ud4e8\ud130&quot;\uc5d0\uc11c","block_context":{"text":"\ucef4\ud4e8\ud130","link":"https:\/\/sarang.inmu.net\/?cat=5"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":584,"url":"https:\/\/sarang.inmu.net\/?p=584","url_meta":{"origin":585,"position":3},"title":"php\ub85c \uac04\ub2e8\ud558\uac8c \ub514\ub809\ud1a0\ub9ac\uc640 \ud30c\uc77c \ub2e4\ub8e8\uae30","author":"sarang","date":"2016\ub144 11\uc6d4 21\uc77c","format":false,"excerpt":"<?php if($handle = opendir('.')){ $i = 0; while(false !==($entry = readdir($handle))){ if($entry != '.' && $entry != '..' && $entry != 'this_file.php'){ $i ++; $tno = explode(\".\",$entry); $no = $tno[0]; $html = \"\uc5ec\uae30\uc5d0 \ud30c\uc77c\uc758 \ub0b4\uc6a9\uc744 \ub123\ub294\ub2e4. \ud30c\uc77c\uc758 \uc774\ub984\uc774 \ud544\uc694\ud558\ub2e4\uba74 $no \ubc30\uc5f4\uc744 \uc0ac\uc6a9\ud558\uc790.\"; $fp=fopen($entry, \"w+\"); fputs($fp,$html); fclose($fp); } } } \u00a0","rel":"","context":"&quot;\ucef4\ud4e8\ud130&quot;\uc5d0\uc11c","block_context":{"text":"\ucef4\ud4e8\ud130","link":"https:\/\/sarang.inmu.net\/?cat=5"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":744,"url":"https:\/\/sarang.inmu.net\/?p=744","url_meta":{"origin":585,"position":4},"title":"CSS \ud639\uc740 JS \ud30c\uc77c\uc758 \uce90\uc2dc","author":"sarang","date":"2017\ub144 01\uc6d4 10\uc77c","format":false,"excerpt":"\ud648\ud398\uc774\uc9c0\ub97c \uac1c\ubc1c \ud560 \ub54c CSS, \ud639\uc740 JS\ud30c\uc77c\uc744 \uc678\ubd80\uc5d0 \ub450\uace0 \uc0ac\uc6a9\ud560 \ub54c\uac00 \ub9ce\uc774 \uc788\ub2e4. HTML\uc740 \uc218\uc815\ud560 \ub54c \uc989\uc2dc \ubc18\uc601\uc774 \ub418\uc9c0\ub9cc \uc678\ubd80\uc5d0 \uc788\ub294 \uc800\ub7f0 \ud30c\uc77c\ub4e4\uc740 \uce90\uc2dc \ub54c\ubb38\uc5d0 \uc989\uc2dc \ubc18\uc601\uc774 \ub418\uc9c0 \uc54a\uace0 CTRL + SHIFT + R \ud0a4\ub97c \ub20c\ub7ec\uc11c \ube0c\ub77c\uc6b0\uc800\ub97c \uc644\uc804 \uc0c8\ub85c \uace0\uce68\ud574\uc57c \ub41c\ub2e4. \uac1c\ubc1c\ud558\ub294 \uc0ac\ub78c\uc774\uc57c \uc704\uc758 \ud0a4\ub97c \ub20c\ub7ec\uc11c \uc0c8\ub85c\uace0\uce68 \ud55c\ub2e4\uc9c0\ub9cc \uae30\uc874\uc5d0 \ud648\ud398\uc774\uc9c0\ub97c\u2026","rel":"","context":"&quot;\ucef4\ud4e8\ud130&quot;\uc5d0\uc11c","block_context":{"text":"\ucef4\ud4e8\ud130","link":"https:\/\/sarang.inmu.net\/?cat=5"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":25,"url":"https:\/\/sarang.inmu.net\/?p=25","url_meta":{"origin":585,"position":5},"title":"\uac04\ub2e8\ud301 \ubaa8\uc74c","author":"sarang","date":"2016\ub144 01\uc6d4 30\uc77c","format":false,"excerpt":"\ud30c\uc77c \uac2f\uc218\uac00 \ub9ce\uc544\uc11c \uc9c0\uc6cc\uc9c0\uc9c0 \uc54a\uc744 \ub54c find . -name '*' -exec rm -f {}\\; \u00a0 utf-8\ub85c \uba54\uc77c \ubcf4\ub0b4\uae30 \uc608\uc81c $from_name=\"=?utf-8?B?\".base64_encode('\uba54\uc77c \uc81c\ubaa9').\"?=\"; $header=\"FROM: \".$from_name.\"\\nReturn-Path:sarang@inmu.net\\nX-Sender:sarang@inmu.net\\n'Content-Type: text\/html;charset=utf-8'\\n\"; $mail_subject='=?utf-8?B?'.base64_encode('\uba54\uc77c\uc81c\ubaa9').'?='; mail('\ubc1b\ub294\uc774\uba54\uc77c\uc8fc\uc18c',$mail_subject,'\uba54\uc77c \ubcf8\ubb38',$header); \u00a0 FTP \ub9c1\ud06c \ub9cc\ub4e4\uae30 ftp:\/\/myid:mypassword@sarang.inmu.net:21\/mydir\/myfile \uc704\uc758 \ub9c1\ud06c\ub294 21\ubc88 \ud3ec\ud2b8\ub85c FTP\uc11c\ubc84\uc5d0 \uc811\uc18d\ud558\uc5ec mydir\ud3f4\ub354\uc5d0\uc11c myfile\uc744 \ub2e4\uc6b4 \ubc1b\ub294 \ub9c1\ud06c\ub97c \ub9cc\ub4e0\ub2e4. a \ud0dc\uadf8\uc5d0 \uc0ac\uc6a9\ud560 \uc218 \uc788\ub2e4. \uc774\ud074\ub9bd\uc2a4\u2026","rel":"","context":"&quot;\ucef4\ud4e8\ud130&quot;\uc5d0\uc11c","block_context":{"text":"\ucef4\ud4e8\ud130","link":"https:\/\/sarang.inmu.net\/?cat=5"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"jetpack_shortlink":"https:\/\/wp.me\/p7qW60-9r","jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/sarang.inmu.net\/index.php?rest_route=\/wp\/v2\/posts\/585","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sarang.inmu.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sarang.inmu.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sarang.inmu.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sarang.inmu.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=585"}],"version-history":[{"count":3,"href":"https:\/\/sarang.inmu.net\/index.php?rest_route=\/wp\/v2\/posts\/585\/revisions"}],"predecessor-version":[{"id":1403,"href":"https:\/\/sarang.inmu.net\/index.php?rest_route=\/wp\/v2\/posts\/585\/revisions\/1403"}],"wp:attachment":[{"href":"https:\/\/sarang.inmu.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=585"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sarang.inmu.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=585"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sarang.inmu.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=585"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}