{"id":431210,"date":"2021-04-18T07:21:15","date_gmt":"2021-04-17T23:21:15","guid":{"rendered":"http:\/\/4563.org\/?p=431210"},"modified":"2021-04-18T07:21:15","modified_gmt":"2021-04-17T23:21:15","slug":"%e5%81%9a%e4%ba%86%e4%b8%80%e4%b8%aa-ocr-%e8%af%86%e5%88%ab%e7%9a%84%e5%be%ae%e4%bf%a1%e5%b0%8f%e7%a8%8b%e5%ba%8f%ef%bc%8c%e5%8f%a3%e5%90%bc%e4%b8%80%e4%b8%8b%ef%bc%81","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=431210","title":{"rendered":"\u505a\u4e86\u4e00\u4e2a ocr \u8bc6\u522b\u7684\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\uff0c\u53e3\u543c\u4e00\u4e0b\uff01"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  \u505a\u4e86\u4e00\u4e2a ocr \u8bc6\u522b\u7684\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\uff0c\u53e3\u543c\u4e00\u4e0b\uff01               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : hj960511 <\/span>  <span><i><\/i> 7<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\"> <\/p>\n<h1>\u7528\u4e8e\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u7684 OCR \u8bc6\u522b\u7ba1\u7406\u7cfb\u7edf<\/h1>\n<p> <\/p>\n<p>\u7cfb\u7edf\u9002\u5408\u7a0b\u5e8f\u5458\u62ff\u6765\u4e8c\u5f00\u6216\u8005\u5c0f\u767d\u5b66\u4e60\u4f7f\u7528\uff0c\u5efa\u8bae\u4e8c\u6b21\u5f00\u53d1\u540e\u90e8\u7f72\u5546\u4e1a\u4f7f\u7528\u3002<\/p>\n<h3>\u5b89\u88c5\u9879\u76ee<\/h3>\n<p>1.\u670d\u52a1\u5668\u8981\u6c42 php \u7248\u672c\u5927\u4e8e 7.1.3 \u7248\u672c\uff0c\u5185\u5b58 2GB\uff0ccpu1 \u6838,linux,nginx \u670d\u52a1\u73af\u5883\u6700\u4f73\u3002<\/p>\n<p>2.\u5b89\u88c5\u6b65\u9aa4 <\/p>\n<p>[composer \u5b89\u88c5]<\/p>\n<p>\u6b65\u9aa4\u4e00\uff1a\u8fdb\u5165\u5230\u6e90\u7801\u76ee\u5f55\uff0c\u5f97\u4f7f\u7528<code>composer install<\/code>\u8fdb\u884c\u5b89\u88c5\u6240\u9700\u7684\u6240\u6709\u6269\u5c55\u6587\u4ef6\u3002<\/p>\n<p>\u6b65\u9aa4\u4e8c\uff1a\u5c06.env.install \u6587\u4ef6\u5185\u5bb9\u8d4b\u503c\u5230 \u65b0\u5efa\u7684\u6587\u4ef6.env \u4e2d <\/p>\n<p>\u6b65\u9aa4\u4e09\uff1a\u6570\u636e\u5e93\u4e2d\u521b\u5efa\u4e00\u4e2a\u6570\u636e\u5e93 \u5e76\u5c06 install.sql \u8fd0\u884c\u586b\u5145 sql \u8fdb\u8fd9\u4e2a\u6570\u636e\u5e93<\/p>\n<p>\u6b65\u9aa4\u56db\uff1a\u4fee\u6539\u914d\u7f6e\u6587\u4ef6.env \u6587\u4ef6\u4e2d\u7684\u6570\u636e\u5e93\u548c\u7528\u6237\u540d<\/p>\n<p>\u6b65\u9aa4\u4e94\uff1a\u914d\u7f6e\u4f2a\u9759\u6001<\/p>\n<p>\u6b65\u9aa4\u516d\uff1a\u6253\u5f00\u57df\u540d\uff0c\u67e5\u770b\u662f\u5426\u5b89\u88c5\u6b63\u786e\u3002<\/p>\n<p>[\u5b8c\u6574\u6e90\u7801 \u5b89\u88c5]<\/p>\n<p>\u6b65\u9aa4\u4e00\uff1a\u5c06.env.install \u6587\u4ef6\u5185\u5bb9\u8d4b\u503c\u5230 \u65b0\u5efa\u7684\u6587\u4ef6.env \u4e2d <\/p>\n<p>\u6b65\u9aa4\u4e8c\uff1a\u6570\u636e\u5e93\u4e2d\u521b\u5efa\u4e00\u4e2a\u6570\u636e\u5e93\u547d\u540d\u4e3a install.sql \u5e76\u5c06 sql \u8fd0\u884c\u586b\u5145 sql \u8fdb\u8fd9\u4e2a\u6570\u636e\u5e93<\/p>\n<p>\u6b65\u9aa4\u4e09\uff1a\u4fee\u6539\u914d\u7f6e\u6587\u4ef6.env \u6587\u4ef6\u4e2d\u7684\u6570\u636e\u5e93\u548c\u7528\u6237\u540d<\/p>\n<p>\u6b65\u9aa4\u56db\uff1a\u914d\u7f6e\u4f2a\u9759\u6001<\/p>\n<p>\u6b65\u9aa4\u4e94\uff1a\u6253\u5f00\u57df\u540d\uff0c\u67e5\u770b\u662f\u5426\u5b89\u88c5\u6b63\u786e\u3002<\/p>\n<p>\u8bf4\u660e\uff1a\u901a\u8fc7 comoser.lock \u8fdb\u884c\u5224\u65ad\u662f\u5426\u662f\u5b8c\u6574\u7248\uff0c\u5982\u679c composer.lock \u5b58\u5728\u5219\u8bf4\u660e\u5df2\u7ecf\u5b89\u88c5\u8fc7\u4e86\u6269\u5c55\u5c5e\u4e8e\u5b8c\u6574\u6e90\u7801\u3002<\/p>\n<p>3.\u7cfb\u7edf\u7ba1\u7406\u5458\u521d\u59cb\u5bc6\u7801<\/p>\n<p>\u7528\u6237\u540d|\u5bc6\u7801 admin|admin888<\/p>\n<p>4.\u6587\u4ef6\u76ee\u5f55 small_app,\u662f\u5c0f\u7a0b\u5e8f\u76ee\u5f55\uff0c\u5c0f\u7a0b\u5e8f\u7684\u914d\u7f6e\u5728\u6839\u76ee\u5f55\u7684 config.js \u4e2d\uff0c\u6ce8\u610f\u53ea\u9700\u8981\u4fee\u6539\u4e0b\u57df\u540d\u5373\u53ef\u6d4b\u8bd5\u3002<\/p>\n<p>5.\u5e38\u89c1\u95ee\u9898\u4e00\u822c\u591a\u4e3a\u9632\u706b\u5899\u3001\u914d\u7f6e\u4fe1\u606f\u9519\u8bef\u3001redis \u7f13\u5b58\u914d\u7f6e\u4e0d\u5f53\u7b49\u5bfc\u81f4\uff0c\u6ce8\u610f\u7ec6\u8282\u3002<\/p>\n<p>6.\u8bf4\u9700\u4f7f\u7528 composer \u8fdb\u884c\u4f9d\u8d56\u5305\u7ba1\u7406\uff0c\u9ed8\u8ba4\u662f\u6ca1\u6709\u4f9d\u8d56\u5305\u7684\uff0c\u8bf7\u5148\u68c0\u67e5\u662f\u5426\u5df2\u7ecf\u5b89\u88c5\u4f9d\u8d56\u5305\u3002<\/p>\n<p>7.\u767e\u5ea6 ocr \u63a5\u53e3\u7533\u8bf7\u5730\u5740\uff1a https:\/\/ai.baidu.com\/tech\/ocr?track=cp:ainsem|pf:pc|pp:chanpin-wenzishibie|pu:wenzishibie-baiduocr|ci:|kw:10002846<\/p>\n<p>8.\u5fae\u4fe1\u652f\u4ed8\u7533\u8bf7\u5730\u5740\uff1a https:\/\/pay.weixin.qq.com<\/p>\n<p>9.\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u6ce8\u518c\u5730\u5740\uff1a https:\/\/mp.weixin.qq.com\/<\/p>\n<p><strong>\u7cfb\u7edf\u547d\u4ee4\u5927\u5168<\/strong><\/p>\n<p>\u5fc5\u8981\u65f6\u4f7f\u7528 php \u547d\u4ee4\u884c\u8fdb\u884c\u9879\u76ee\u7684\u521d\u59cb\u5316\uff0c\u6309\u9700\u4f7f\u7528\u3002<\/p>\n<pre><code> php artisan make:controller Index\/IndexController  \u521b\u5efa\u63a7\u5236\u5668  php artisan make:model Index\/IndexController \u521b\u5efa\u6a21\u578b  php artisan make:middleware Check \u521b\u5efa\u4e2d\u95f4\u4ef6  php artisan config:clear \u6e05\u7406\u914d\u7f6e\u7f13\u5b58 \u66f4\u6539.env \u540e\u9700\u8981  php artisan key:generate \u751f\u6210\u552f\u4e00 key \u9700\u8981 env \u5b58\u5728\u7684\u65f6\u5019\u6709\u6548\u6267\u884c  <\/code><\/pre>\n<p>\u6ce8\uff1a\u9700\u8981 php \u547d\u4ee4\u884c\u7248\u672c\u4e3a 7.1.3 \u4ee5\u4e0a\u7248\u672c\u3002<\/p>\n<p><strong>\u4f2a\u9759\u6001\u89c4\u5219<\/strong><\/p>\n<p>\u5b9d\u5854\u9762\u677f\u7684 nginx \u73af\u5883\u4e0b\uff1a<\/p>\n<pre><code> location \/ {        try_files $uri $uri\/ \/index.php$is_args$query_string;    }  <\/code><\/pre>\n<p>\u5b9d\u5854\u9762\u677f\u7684 apache \u73af\u5883\u4e0b\uff1a<\/p>\n<p>\u8bf4\u660e\uff1a\u8bf7\u76f4\u63a5\u9009\u62e9\u5bf9\u5e94\u7248\u672c\u7684\u4f2a\u9759\u6001\u5373\u53ef\u3002<\/p>\n<p>phpstudy \u7684 apache \u73af\u5883\u4e0b\uff1a<\/p>\n<pre><code> &lt;IfModule mod_rewrite.c&gt;      &lt;IfModule mod_negotiation.c&gt;          Options -MultiViews -Indexes      &lt;\/IfModule&gt;        RewriteEngine On        # Handle Authorization Header      RewriteCond %{HTTP:Authorization} .      RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]        # Redirect Trailing Slashes If Not A Folder...      RewriteCond %{REQUEST_FILENAME} !-d      RewriteCond %{REQUEST_URI} (.+)\/$      RewriteRule ^ %1 [L,R=301]        # Handle Front Controller...      RewriteCond %{REQUEST_FILENAME} !-d      RewriteCond %{REQUEST_FILENAME} !-f      RewriteRule ^ index.php [L]  &lt;\/IfModule&gt;    <\/code><\/pre>\n<p>\u6839\u76ee\u5f55\u7684.htacces \u6587\u4ef6\u4e2d\u914d\u7f6e<\/p>\n<p>phostudy \u7684 nginx \u73af\u5883\u4e0b\uff1a<\/p>\n<pre><code> location \/ {try_files $uri $uri\/ \/index.php?$query_string;}    <\/code><\/pre>\n<p>\u6e90\u7801\u83b7\u53d6\u5730\u5740\uff1a https:\/\/www.youqiong.net\/product\/show\/11137<\/p>\n<\/p><\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>1<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"5635209\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : hj960511 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u6ef4\u6ef4                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>\u505a\u4e86\u4e00\u4e2a ocr \u8bc6\u522b\u7684\u5fae\u4fe1\u5c0f\u7a0b\u5e8f&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/431210"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=431210"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/431210\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=431210"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=431210"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=431210"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}