
{"id":189,"date":"2015-06-25T18:01:32","date_gmt":"2015-06-25T10:01:32","guid":{"rendered":"https:\/\/www.webteach.tw\/?p=189"},"modified":"2015-06-25T18:01:32","modified_gmt":"2015-06-25T10:01:32","slug":"php-%e7%94%a2%e7%94%9fqr-code","status":"publish","type":"post","link":"https:\/\/www.webteach.tw\/?p=189","title":{"rendered":"[ PHP ] &#8211; \u7522\u751fQR-Code"},"content":{"rendered":"<div style='text-align:center' class='yasr-auto-insert-overall'><\/div><div style='text-align:center' class='yasr-auto-insert-visitor'><\/div><div style=\"margin-top: 0px; margin-bottom: 0px;\" class=\"sharethis-inline-share-buttons\" ><\/div><p>\t\t\t\t1.\u8acb\u5148\u5230\u8a72\u7db2\u7ad9\u4e0b\u8f09\u6a94\u6848<br \/>\n<a href=\"http:\/\/www.swetake.com\/qrcode\/qr_cgi_e.html\" target=\"_blank\" rel=\"noopener noreferrer\">http:\/\/www.swetake.com\/qrcode\/qr_cgi_e.html<\/a><br \/>\n2.\u5c07\u4e0b\u8f09\u7684\u6a94\u6848\u4e0a\u50b3\u5230\u4f60\u7684\u4e3b\u6a5f\u4e0a<br \/>\n3.\u95b1\u8b80 readme<br \/>\n<a href=\"http:\/\/www.swetake.com\/qrcode\/README-e.txt\" target=\"_blank\" rel=\"noopener noreferrer\">http:\/\/www.swetake.com\/qrcode\/README-e.txt<\/a><br \/>\n4.\u53c3\u6578<br \/>\nqr_img.php?d=data[&#038;e=(L,M,Q,H)][&#038;s=int size][&#038;v=(1-40)][&#038;t=J]<br \/>\n          [&#038;m=(1-16)&#038;n=(2-16)[&#038;o=original data][&#038;p=(0-255)]]<br \/>\nd : Data you want to encode to QRcode.<br \/>\n    A special letter like &#8216;%&#8217;.space or 8bit letter must be URL-encoded.<br \/>\n    You cannot omit this parameter.<br \/>\ne : Error correct level<br \/>\n    You can set &#8216;L&#8217;,&#8217;M&#8217;,&#8217;Q&#8217; or &#8216;H&#8217;.<br \/>\n    If you don&#8217;t set,program selects &#8216;M&#8217;.<br \/>\ns : module size<br \/>\n    This parameter is no effect in HTML mode.<br \/>\n    You can set a number more than 1.<br \/>\n    Image size depends on this parameter.<br \/>\n    If you don&#8217;t set,program selects &#8216;4&#8217; in PNG mode or &#8216;8&#8217; in JPEG mode.<br \/>\nv : version<br \/>\n    You can set 1-40.<br \/>\n    If you don&#8217;t set,program automatically selects.<br \/>\nt : image type<br \/>\n    You can set &#8216;J&#8217;,&#8217;H&#8217; or other.<br \/>\n    &#8216;J&#8217; : jpeg mode.<br \/>\n    &#8216;H&#8217; : html mode.(for perl only)<br \/>\n    Other : png mode.<br \/>\n    If you don&#8217;t set,program select PNG mode.<br \/>\n\u4fee\u6539 qr_img.php \u6700\u4e0b\u65b9\u7a0b\u5f0f<br \/>\n[php]<br \/>\n&lt;?php<br \/>\n\/*<br \/>\n#&#8212; output image<br \/>\n#<br \/>\n*\/<br \/>\nHeader(&quot;Content-type: image\/&quot;.$qrcode_image_type);<br \/>\nImageCopyResized($output_image,$base_image,0,0,0,0,$qrcode_image_size,$qrcode_image_size,$mib,$mib);<br \/>\nif ($qrcode_image_type == &quot;jpeg&quot;){<br \/>\n    \/\/\u539f\u672c\u7a0b\u5f0f ImageJpeg($output_image);<br \/>\n    ImageJpeg($output_image,&#8217;.\/img\/&#8217;.$qrcode_data_string.&#8217;.jpg&#8217;);\/\/\u6539\u9019\u6a23\u624d\u80fd\u5b58\u6a94<br \/>\n} else {<br \/>\n    \/\/\u539f\u672c\u7a0b\u5f0f ImagePng($output_image);<br \/>\n    ImagePng($output_image,&#8217;.\/img\/&#8217;.$qrcode_data_string.&#8217;.png&#8217;);\/\/\u6539\u9019\u6a23\u624d\u80fd\u5b58\u6a94<br \/>\n\/\/\u8a18\u5f97img\u9019\u500b\u8cc7\u6599\u593e\u7684\u6b0a\u9650\u8981\u958b\u6210777<br \/>\n}<br \/>\n?&gt;<br \/>\n[\/php]\t\t<\/p>\n<div style='text-align:center' class='yasr-auto-insert-overall'><\/div><div style='text-align:center' class='yasr-auto-insert-visitor'><\/div>","protected":false},"excerpt":{"rendered":"<p>1.\u8acb\u5148\u5230\u8a72\u7db2\u7ad9\u4e0b\u8f09\u6a94\u6848 http:\/\/ [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"yasr_overall_rating":0,"yasr_post_is_review":"","yasr_auto_insert_disabled":"","yasr_review_type":"","footnotes":""},"categories":[36],"tags":[475],"class_list":["post-189","post","type-post","status-publish","format-standard","hentry","category-php","tag-qrcode"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>[ PHP ] - \u7522\u751fQR-Code - \u6df7\u6c34\u6478\u9b5a<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.webteach.tw\/?p=189\" \/>\n<meta property=\"og:locale\" content=\"zh_TW\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"[ PHP ] - \u7522\u751fQR-Code - \u6df7\u6c34\u6478\u9b5a\" \/>\n<meta property=\"og:description\" content=\"1.\u8acb\u5148\u5230\u8a72\u7db2\u7ad9\u4e0b\u8f09\u6a94\u6848 http:\/\/ [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.webteach.tw\/?p=189\" \/>\n<meta property=\"og:site_name\" content=\"\u6df7\u6c34\u6478\u9b5a\" \/>\n<meta property=\"article:published_time\" content=\"2015-06-25T10:01:32+00:00\" \/>\n<meta name=\"author\" content=\"jeff\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005:\" \/>\n\t<meta name=\"twitter:data1\" content=\"jeff\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9810\u4f30\u95b1\u8b80\u6642\u9593\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 \u5206\u9418\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.webteach.tw\\\/?p=189#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.webteach.tw\\\/?p=189\"},\"author\":{\"name\":\"jeff\",\"@id\":\"https:\\\/\\\/www.webteach.tw\\\/#\\\/schema\\\/person\\\/d434d754fd581338113eecfa923d7520\"},\"headline\":\"[ PHP ] &#8211; \u7522\u751fQR-Code\",\"datePublished\":\"2015-06-25T10:01:32+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.webteach.tw\\\/?p=189\"},\"wordCount\":236,\"commentCount\":2,\"keywords\":[\"qrcode\"],\"articleSection\":[\"PHP\"],\"inLanguage\":\"zh-TW\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.webteach.tw\\\/?p=189#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.webteach.tw\\\/?p=189\",\"url\":\"https:\\\/\\\/www.webteach.tw\\\/?p=189\",\"name\":\"[ PHP ] - \u7522\u751fQR-Code - \u6df7\u6c34\u6478\u9b5a\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.webteach.tw\\\/#website\"},\"datePublished\":\"2015-06-25T10:01:32+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.webteach.tw\\\/#\\\/schema\\\/person\\\/d434d754fd581338113eecfa923d7520\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.webteach.tw\\\/?p=189#breadcrumb\"},\"inLanguage\":\"zh-TW\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.webteach.tw\\\/?p=189\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.webteach.tw\\\/?p=189#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9801\",\"item\":\"https:\\\/\\\/www.webteach.tw\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"[ PHP ] &#8211; \u7522\u751fQR-Code\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.webteach.tw\\\/#website\",\"url\":\"https:\\\/\\\/www.webteach.tw\\\/\",\"name\":\"\u6df7\u6c34\u6478\u9b5a\",\"description\":\"\u5b78\u7121\u6b62\u5883,\u6559\u5b78\u76f8\u9577\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.webteach.tw\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"zh-TW\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.webteach.tw\\\/#\\\/schema\\\/person\\\/d434d754fd581338113eecfa923d7520\",\"name\":\"jeff\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-TW\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/5797200e421b670a2ce64d6e7382054c69b231d4aab55742c96bb1e51bc9fefc?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/5797200e421b670a2ce64d6e7382054c69b231d4aab55742c96bb1e51bc9fefc?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/5797200e421b670a2ce64d6e7382054c69b231d4aab55742c96bb1e51bc9fefc?s=96&d=mm&r=g\",\"caption\":\"jeff\"},\"sameAs\":[\"http:\\\/\\\/35.72.55.111\"],\"url\":\"https:\\\/\\\/www.webteach.tw\\\/?author=1\"},false]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"[ PHP ] - \u7522\u751fQR-Code - \u6df7\u6c34\u6478\u9b5a","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.webteach.tw\/?p=189","og_locale":"zh_TW","og_type":"article","og_title":"[ PHP ] - \u7522\u751fQR-Code - \u6df7\u6c34\u6478\u9b5a","og_description":"1.\u8acb\u5148\u5230\u8a72\u7db2\u7ad9\u4e0b\u8f09\u6a94\u6848 http:\/\/ [&hellip;]","og_url":"https:\/\/www.webteach.tw\/?p=189","og_site_name":"\u6df7\u6c34\u6478\u9b5a","article_published_time":"2015-06-25T10:01:32+00:00","author":"jeff","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005:":"jeff","\u9810\u4f30\u95b1\u8b80\u6642\u9593":"1 \u5206\u9418"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.webteach.tw\/?p=189#article","isPartOf":{"@id":"https:\/\/www.webteach.tw\/?p=189"},"author":{"name":"jeff","@id":"https:\/\/www.webteach.tw\/#\/schema\/person\/d434d754fd581338113eecfa923d7520"},"headline":"[ PHP ] &#8211; \u7522\u751fQR-Code","datePublished":"2015-06-25T10:01:32+00:00","mainEntityOfPage":{"@id":"https:\/\/www.webteach.tw\/?p=189"},"wordCount":236,"commentCount":2,"keywords":["qrcode"],"articleSection":["PHP"],"inLanguage":"zh-TW","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.webteach.tw\/?p=189#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.webteach.tw\/?p=189","url":"https:\/\/www.webteach.tw\/?p=189","name":"[ PHP ] - \u7522\u751fQR-Code - \u6df7\u6c34\u6478\u9b5a","isPartOf":{"@id":"https:\/\/www.webteach.tw\/#website"},"datePublished":"2015-06-25T10:01:32+00:00","author":{"@id":"https:\/\/www.webteach.tw\/#\/schema\/person\/d434d754fd581338113eecfa923d7520"},"breadcrumb":{"@id":"https:\/\/www.webteach.tw\/?p=189#breadcrumb"},"inLanguage":"zh-TW","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.webteach.tw\/?p=189"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.webteach.tw\/?p=189#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9801","item":"https:\/\/www.webteach.tw\/"},{"@type":"ListItem","position":2,"name":"[ PHP ] &#8211; \u7522\u751fQR-Code"}]},{"@type":"WebSite","@id":"https:\/\/www.webteach.tw\/#website","url":"https:\/\/www.webteach.tw\/","name":"\u6df7\u6c34\u6478\u9b5a","description":"\u5b78\u7121\u6b62\u5883,\u6559\u5b78\u76f8\u9577","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.webteach.tw\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"zh-TW"},{"@type":"Person","@id":"https:\/\/www.webteach.tw\/#\/schema\/person\/d434d754fd581338113eecfa923d7520","name":"jeff","image":{"@type":"ImageObject","inLanguage":"zh-TW","@id":"https:\/\/secure.gravatar.com\/avatar\/5797200e421b670a2ce64d6e7382054c69b231d4aab55742c96bb1e51bc9fefc?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/5797200e421b670a2ce64d6e7382054c69b231d4aab55742c96bb1e51bc9fefc?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/5797200e421b670a2ce64d6e7382054c69b231d4aab55742c96bb1e51bc9fefc?s=96&d=mm&r=g","caption":"jeff"},"sameAs":["http:\/\/35.72.55.111"],"url":"https:\/\/www.webteach.tw\/?author=1"},false]}},"views":4629,"yasr_visitor_votes":{"stars_attributes":{"read_only":false,"span_bottom":false},"number_of_votes":0,"sum_votes":0},"_links":{"self":[{"href":"https:\/\/www.webteach.tw\/index.php?rest_route=\/wp\/v2\/posts\/189","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.webteach.tw\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.webteach.tw\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.webteach.tw\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.webteach.tw\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=189"}],"version-history":[{"count":0,"href":"https:\/\/www.webteach.tw\/index.php?rest_route=\/wp\/v2\/posts\/189\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.webteach.tw\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=189"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.webteach.tw\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=189"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.webteach.tw\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=189"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}