{"id":3262,"date":"2010-05-19T06:33:54","date_gmt":"2010-05-19T06:33:54","guid":{"rendered":"http:\/\/www.happyfam.or.kr\/ysoh\/%ed%9a%8c%ec%9b%90%eb%aa%a9%eb%a1%9d-%ec%b6%9c%eb%a0%a5\/"},"modified":"2015-02-10T21:11:48","modified_gmt":"2015-02-10T12:11:48","slug":"%ed%9a%8c%ec%9b%90%eb%aa%a9%eb%a1%9d-%ec%b6%9c%eb%a0%a5","status":"publish","type":"post","link":"https:\/\/www.happyfam.or.kr\/ysoh\/%ed%9a%8c%ec%9b%90%eb%aa%a9%eb%a1%9d-%ec%b6%9c%eb%a0%a5\/","title":{"rendered":"PHP \ud68c\uc6d0\ubaa9\ub85d \ucd9c\ub825"},"content":{"rendered":"<p>dbConfig.php<\/p>\n<div>\n<div>\n<\/div>\n<div class=\"txc-textbox\">\n<div>\n&lt;?php<\/div>\n<div>\n\n<\/div>\n<div>\n$dbHost = &#8220;localhost&#8221;;<\/div>\n<div>\n$dbUser = &#8220;dbuser&#8221;;<\/div>\n<div>\n$dbpass = &#8220;dbpass&#8221;;<\/div>\n<div>\n$dbName = &#8220;dbname&#8221;;<\/div>\n<div>\n\n<\/div>\n<div>\n?&gt;<\/div>\n<\/div>\n<div>\n<\/div>\n<div>\n\n<\/div>\n<div>\nmemberList.php<\/div>\n<div>\n<div>\n<\/div>\n<div class=\"txc-textbox\">\n<div>\n&lt;?php<\/div>\n<div>\nrequire &#8220;.\/dbConfig.php&#8221;;<\/div>\n<div>\n\n<\/div>\n<div>\n$sql = &#8220;SELECT userid, username, email FROM php_member&#8221;;<\/div>\n<div>\n\n<\/div>\n<div>\n$dbConn = mysql_connect($dbHost, $dbUser, $dbpass);<\/div>\n<div>\nmysql_select_db($dbName, $dbConn);<\/div>\n<div>\nmysql_set_charset(&#8220;utf8&#8221;);<\/div>\n<div>\n$result = mysql_query($sql, $dbConn);<\/div>\n<div>\n\n<\/div>\n<div>\n?&gt;<\/div>\n<div>\n&lt;!DOCTYPE HTML PUBLIC &#8220;-\/\/W3C\/\/DTD HTML 4.01 Transitional\/\/EN&#8221;&gt;<\/div>\n<div>\n&lt;html&gt;<\/div>\n<div>\n&nbsp;&nbsp; &nbsp;&lt;head&gt;<\/div>\n<div>\n&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;&lt;meta http-equiv=&#8221;Content-Type&#8221; content=&#8221;text\/html; charset=UTF-8&#8243;&gt;<\/div>\n<div>\n&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;&lt;title&gt;&lt;\/title&gt;<\/div>\n<div>\n&nbsp;&nbsp; &nbsp;&lt;\/head&gt;<\/div>\n<div>\n&nbsp;&nbsp; &nbsp;&lt;body&gt;<\/div>\n<div>\n&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;\uc544\uc774\ub514 \uc774\ub984 \uc774\uba54\uc77c &lt;br \/&gt;<\/div>\n<div>\n&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;&lt;?php<\/div>\n<div>\n&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;while ($rec = mysql_fetch_array($result)) {<\/div>\n<div>\n&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;echo $rec[&#8220;userid&#8221;] . &#8221; &#8221; . $rec[&#8220;username&#8221;] . &#8221; &#8221; . $rec[&#8220;email&#8221;] . &#8220;&lt;br \/&gt;&#8221;;<\/div>\n<div>\n&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;}<\/div>\n<div>\n&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;?&gt;<\/div>\n<div>\n&nbsp;&nbsp; &nbsp;&lt;\/body&gt;<\/div>\n<div>\n&lt;\/html&gt;<\/div>\n<div>\n&lt;?<\/div>\n<div>\nmysql_close($dbConn);<\/div>\n<div>\n?&gt;<\/div>\n<\/div>\n<div>\n<\/div>\n<div>\n\n<\/div>\n<div>\n\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>dbConfig.php &lt;?php $dbHost = &#8220;localhost&#8221;; $dbUser = &#8220;dbuser&#8221;; $dbpass = &#8220;dbpass&#8221;; $dbName = &#8220;dbname&#8221;; ?&gt; memberList.php &lt;?php require &#8220;.\/dbConfig.php&#8221;; $sql = &#8220;SELECT userid, username, email FROM php_member&#8221;; $dbConn = mysql_connect($dbHost, $dbUser, $dbpass); mysql_select_db($dbName, $dbConn); mysql_set_charset(&#8220;utf8&#8221;); $result = mysql_query($sql, $dbConn); ?&gt; &lt;!DOCTYPE HTML PUBLIC &#8220;-\/\/W3C\/\/DTD HTML 4.01 Transitional\/\/EN&#8221;&gt; &lt;html&gt; &nbsp;&nbsp; &nbsp;&lt;head&gt; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp;&lt;meta http-equiv=&#8221;Content-Type&#8221;\u2026 <span class=\"read-more\"><a href=\"https:\/\/www.happyfam.or.kr\/ysoh\/%ed%9a%8c%ec%9b%90%eb%aa%a9%eb%a1%9d-%ec%b6%9c%eb%a0%a5\/\">Read More &raquo;<\/a><\/span><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_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":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[241],"tags":[40,53],"class_list":["post-3262","post","type-post","status-publish","format-standard","hentry","category-php","tag-php","tag-webdb"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p776QY-QC","jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/www.happyfam.or.kr\/ysoh\/wp-json\/wp\/v2\/posts\/3262","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.happyfam.or.kr\/ysoh\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.happyfam.or.kr\/ysoh\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.happyfam.or.kr\/ysoh\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.happyfam.or.kr\/ysoh\/wp-json\/wp\/v2\/comments?post=3262"}],"version-history":[{"count":0,"href":"https:\/\/www.happyfam.or.kr\/ysoh\/wp-json\/wp\/v2\/posts\/3262\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.happyfam.or.kr\/ysoh\/wp-json\/wp\/v2\/media?parent=3262"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.happyfam.or.kr\/ysoh\/wp-json\/wp\/v2\/categories?post=3262"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.happyfam.or.kr\/ysoh\/wp-json\/wp\/v2\/tags?post=3262"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}