{"id":87,"date":"2007-04-14T12:00:00","date_gmt":"2007-04-14T12:00:00","guid":{"rendered":""},"modified":"2011-04-25T08:41:14","modified_gmt":"2011-04-25T08:41:14","slug":"%e5%9c%a8web%e7%a8%8b%e5%ba%8f%e4%b8%ad%e9%9a%90%e8%97%8f%e5%90%8e%e9%97%a8","status":"publish","type":"post","link":"https:\/\/www.inbreak.net\/archives\/87.html","title":{"rendered":"\u5728WEB\u7a0b\u5e8f\u4e2d\u9690\u85cf\u540e\u95e8"},"content":{"rendered":"
\u4f5c\u8005\uff1a \u7a7a\u865a\u6d6a\u5b50\u5fc3 <\/p>\n
\u3000\u3000\u5728\u5f88\u591a\u5546\u4e1a\u7a0b\u5e8f\u4e2d,\u7a0b\u5e8f\u5458\u4e5f\u8bb8\u4f1a\u51fa\u4e8e\u67d0\u79cd\u76ee\u7684\uff0c\u5728\u7a0b\u5e8f\u4e2d\u7559\u4e0b\u540e\u95e8\u3002\u6211\u4eec\u4e0d\u8ba8\u8bba\u8fd9\u6837\u505a\u7684\u76ee\u7684\u662f\u4ec0\u4e48\uff0c\u53ea\u8c08\u8c08\u5982\u4f55\u5728\u7a0b\u5e8f\u4e2d\u9690\u85cf\u4e00\u4e2a\u201c\u7ec8\u6781\u540e\u95e8\u201d\u3002 <\/p>\n
\u3000\u3000\u9996\u5148\u7ed9\u5927\u5bb6\u770b\u4e00\u4e2a\u4f8b\u5b50\uff0c\u53bb\u5e74\u6211\u5199\u4e86\u4e00\u7bc7\u6587\u7ae0\u300a\u5bf9\u6821\u56ed\u7f51\u7684\u7b2c\u4e8c\u6b21\u5b89\u5168\u68c0\u6d4b\uff0c\u6587\u4e2d\u63d0\u5230\u4e00\u4e2a\u7c7b\u4f3c\u7684\u540e\u95e8\uff1a\u201c\u2026\u9690\u85cf\u8d26\u6237\u505a\u540e\u95e8\uff01\u2026\u5982\u679c\u4e0d\u662f\u6211\u5148\u62ff\u5230\u6570\u636e\u5e93\uff0c\u5206\u6790\u4e86\u4e00\u6bb5\u65f6\u95f4\u4ee5\u540e\u624d\u62ff\u5230\u7a0b\u5e8f\uff0c\u76f8\u4fe1\u6211\u4e5f\u4e0d\u4f1a\u6ce8\u610f\u8fd9\u4e2a\u95ee\u9898\u3002\u67d0\u8d26\u6237\uff0c\u5728\u540e\u53f0\u67e5\u8be2\u7ba1\u7406\u5458\u8d26\u6237\u7684\u65f6\u5019\uff0c\u4ed6\u4e0d\u51fa\u73b0\uff0c\u5728\u7ba1\u7406\u5458\u67e5\u8be2\u767b\u9646\u548c\u5de5\u4f5c\u65e5\u5fd7\u7684\u65f6\u5019\uff0c\u4ed6\u81ea\u52a8\u6d88\u5931\u2026\u201d\u3002\u5f53\u65f6\u5bf9JSP\u4e0d\u4e86\u89e3\uff0c\u901a\u8fc7TOMCAT\u914d\u7f6e\u4e0d\u6b63\u786e\u6f0f\u6d1e\u4e0b\u8f7d\u4e86\u6570\u636e\u5e93\uff0c\u7136\u540e\u767b\u9646\u540e\u53f0\uff0c\u7acb\u523b\u5c31\u53d1\u73b0\u4e0d\u5bf9\uff0c\u77e5\u9053\u6709\u4e2a\u540e\u95e8\uff0c\u5374\u4e0d\u77e5\u9053\u662f\u4ec0\u4e48\u539f\u7406\uff0c\u8fd9\u6b21\u6211\u4eec\u6765\u628a\u7a0b\u5e8f\u4ed4\u7ec6\u201c\u89e3\u5256\u201d\u4e0b\u3002 <\/p>\n
\u3000\u3000\u4e00\u822c\u60c5\u51b5\u4e0b\uff0c\u5728\u9875\u9762\u4e0a\u663e\u793a\u7528\u6237\u5217\u8868\uff0c\u662f\u7531\u9875\u9762\u53bb\u67e5\u8be2\u6570\u636e\u5e93\u7684\u6570\u636e\uff0c\u7136\u540e\u8fd4\u56de\u7ed9\u6d4f\u89c8\u5668\u3002\u67e5\u8be2\u51fa\u6765\u7684\u6570\u636e\u662f\u4e00\u5806\u201c\u7ed3\u679c\u96c6\u201d\uff0c\u9875\u9762\u663e\u793a\u7684\u65f6\u5019\u4f1a\u628a\u5b83\u4eec\u4e00\u6761\u4e00\u6761\u904d\u5386\u51fa\u6765\u3002\u6253\u5f00\u5b58\u5728\u6f0f\u6d1e\u7684\u9875\u9762\uff0cmanager.jsp\u6587\u4ef6\u4ee3\u7801\u627e\u5230\u663e\u793a\u7528\u6237\u5217\u8868\u7684\u4ee3\u7801\uff08\u6211\u52a0\u4e0a\u4e86\u6ce8\u91ca\uff09\uff1a <\/p>\n
<\/p>\n
\u3000\u3000\u53d1\u73b0\u6709\u4e2a\u91cd\u8981\u7684\u6570\u7ec4\u53d8\u91cfmanager\uff0c\u770b\u770b\u5b83\u662f\u600e\u4e48\u6765\u7684\uff0c\u5f80\u4e0a\u627e\uff1a <\/p>\n
<\/p>\n
\u3000\u3000\u53ef\u4ee5\u770b\u5230\u4ee3\u7801\u4e2dmanager\u7684\u503c\u662f\u901a\u8fc7\u8c03\u7528managermgt\u7684search\u65b9\u6cd5\u8fd4\u56de\u7684\u6570\u7ec4\u3002JSP\u7a0b\u5e8f\u5728\u670d\u52a1\u5668\u4e0b\u8fd0\u884c\uff0c\u9664\u4e86JSP\u6587\u4ef6\u672c\u8eab\uff0c\u5728WEB-INF\u76ee\u5f55\u4e0b\u7684classes\u76ee\u5f55\u91cc\uff0c\u6709\u4e00\u4e9b\u201c.class\u6587\u4ef6\u201d,\u4ed6\u4eec\u662f\u5df2\u7ecf\u5199\u597d\u7684JAVA\u7c7b\uff0c\u53ef\u4ee5\u7528\u6765\u5b9e\u4f8b\u5316\u5bf9\u8c61\u3002Managermgt\u5bf9\u8c61\u662fMgrMgt\u8fd9\u4e2a\u7c7b\u5b9e\u4f8b\u5316\u51fa\u6765\u7684\uff0c\u5728manager.jsp\u91cc\uff0c\u4e00\u5f00\u59cb\u5c31\u5bfc\u5165\u4e86\u201cspeedcharge.controller.*\u201d\u4e0b\u7684\u5168\u90e8\u5305\u3002 <\/p>\n
\u3000\u3000\uff1c%@ page contentType="text\/html; charset=gb2312" language="java" import="java.sql.*,speedcharge.entity.*,speedcharge.controller.*" errorPage="" %\uff1e <\/p>\n
\u3000\u3000\u201c.class\u201d\u6587\u4ef6\u5b58\u50a8\u7684\u662fjava\u5b57\u8282\u7801\uff0c\u662f\u7531.JAVA\u6587\u4ef6\u7f16\u8bd1\u800c\u6765\u7684\uff0c\u5e76\u4e0d\u662f\u6e90\u4ee3\u7801\u3002\u6240\u4ee5\u6211\u4eec\u8981\u53cd\u7f16\u8bd1\u56de\u53bb\u3002\u4f7f\u7528\u201cjad.exe\u201d\u53cd\u7f16\u8bd1\uff0c\u7136\u540e\u627e\u5230MgrMgt \u7c7b\u7684search\u65b9\u6cd5\uff1a <\/p>\n
\u3000\u3000\u2026\u2026Manager amanager[] = null;\u2026\u2026\/\/\u8c03\u7528searchManager\u65b9\u6cd5
\n\u3000\u3000amanager = Manager.searchManager(s);\u2026\u2026 <\/p>\n
\u3000\u3000\u7ee7\u7eed\u5f80\u4e0b\u627e\uff0cManager \u7c7b\u7684searchManager\u65b9\u6cd5\u3002<\/p>\n
<\/p>\n
\u3000\u3000\u770b\u5230\u4e86\u5427\uff01\u8fd9\u4e2a\u7a0b\u5e8f\u4ece\u8fd9\u6761SQL\u8bed\u53e5\u4e0a\u505a\u4e86\u624b\u811a\uff0c\u8ba9\u5ba2\u6237\u5728\u540e\u53f0\u67e5\u8be2\u6240\u6709\u7ba1\u7406\u5458\u65f6\u770b\u4e0d\u5230’ilovethisgame’\u8fd9\u4e2a\u7528\u6237,\u8bb0\u5f55\u65e5\u5fd7\u7684\u65f6\u5019\uff0c\u4e5f\u540c\u6837\u4f7f\u7528\u4e86\u7c7b\u4f3c\u7684\u65b9\u6cd5\uff0c\u5bfc\u81f4\u7cfb\u7edf\u65e5\u5fd7\u5ffd\u7565\u4e86\u8be5\u7528\u6237\u3002\u800c\u7a0b\u5e8f\u7684\u5176\u4ed6\u5730\u65b9\uff0c\u6bd4\u5982\u4fee\u6539\u7ba1\u7406\u5458\u3001\u767b\u9646\uff0c\u7b49\u5730\u65b9\u4e0d\u53d7\u5f71\u54cd\u3002 <\/p>\n
\u3000\u3000\u8fd9\u4e2a\u4f8b\u5b50\uff0c\u603b\u4f53\u4e0a\u6765\u8bf4\u601d\u60f3\u5f88\u6709\u521b\u610f\uff0c\u4f46\u662f\u624b\u6cd5\u4e0a\u5e76\u4e0d\u6210\u719f\uff0c\u53ea\u8981\u770b\u5230\u4e86\u4ee3\u7801\uff0c\u6216\u8005\u770b\u5230\u4e86\u6570\u636e\u5e93\u7684\u6570\u636e\uff0c\u5c31\u4f1a\u88ab\u6211\u4e00\u5c42\u4e00\u5c42\u6293\u51fa\u6765\uff0c\u751a\u81f3\u5728\u6211\u4ee5\u524d\u4e0d\u61c2JSP\u7684\u60c5\u51b5\u4e0b\u8fd8\u628a\u540e\u95e8\u63ea\u4e86\u51fa\u6765\u3002\u800c\u4e14\u6570\u636e\u5e93\u91cc\u7684\u7ba1\u7406\u5458\u8868\u91cc\u7684\u6570\u636e\u4e5f\u5f88\u660e\u663e\uff0c\u4e00\u65e6\u5ba2\u6237\u4f7f\u7528mysqladmin\u4e00\u7c7b\u7684\u5de5\u5177\u6d4f\u89c8\u6570\u636e\u5e93\uff0c\u4e0d\u5c31\u66dd\u5149\u4e86\uff1f\u540e\u95e8\u7684\u201c\u8986\u76d6\u9762\u201d\u6709\u70b9\u5927\uff0c\u5bb9\u6613\u88ab\u5ba2\u6237\u7684\u6570\u636e\u5e93\u7ba1\u7406\u5458\u53d1\u73b0\u3002 <\/p>\n
\u3000\u3000MYSQL 5.0\u7248\u672c\u5df2\u7ecf\u652f\u6301\u4e86\u5b58\u50a8\u8fc7\u7a0b\uff0c\u9488\u5bf9\u8fd9\u4e2a\u4f8b\u5b50\uff0c\u5e94\u8be5\u628a\u540e\u95e8\u653e\u5230\u6570\u636e\u5e93\u7684\u5b58\u50a8\u8fc7\u7a0b\u4e2d\uff0c\u8fd9\u6837\u7a0b\u5e8f\u91cc\u5c31\u4e0d\u4f1a\u51fa\u73b0\u8fd9\u4e48\u660e\u663e\u7684\u75d5\u8ff9\u3002\u5f53\u5ba2\u6237\u67e5\u770b\u4ee3\u7801\u65f6\uff0c\u53ea\u80fd\u770b\u5230\u4e00\u4e2a\u8fd4\u56de\u7ed3\u679c\u96c6\u7684\u5b58\u50a8\u8fc7\u7a0b\uff0c\u628a\u8fd9\u53e5"SELECT * FROM csmmanager WHERE managerid <> ‘ilovethisgame’"\u5c01\u88c5\u5230\u5b58\u50a8\u8fc7\u7a0b\u91cc\u3002\u5728\u767b\u9646\u7684\u65f6\u5019\u4e5f\u8c03\u7528\u4e00\u4e2a\u8fd4\u56de\u503c\u662f\u5e03\u5c14\u7684\u5b58\u50a8\u8fc7\u7a0b\uff0c\u5224\u65ad\u5982\u679c\u7528\u6237\u662filovethisgame\u65f6\uff0c\u76f4\u63a5\u901a\u8fc7\u3002\u6548\u679c\u662f\u4e00\u6837\u7684\uff0c\u5374\u5f88\u9690\u853d\uff0c\u4ee3\u7801\u7b80\u5355\uff0c\u6211\u5c31\u4e0d\u5199\u4e86,\u53ea\u63d0\u4f9b\u4e2a\u601d\u8def\u3002 <\/p>\n
\u3000\u3000\u603b\u7684\u6765\u8bf4\uff0c\u6211\u4eec\u5e94\u8be5\u5c3d\u91cf\u51cf\u5c11\u4ee3\u7801\u91cc\u7684\u540e\u95e8\u75d5\u8ff9\uff0c\u628a\u4fa7\u91cd\u70b9\u6254\u5230\u6570\u636e\u5e93\u4e0a\u3002\u6709\u8fd9\u4e48\u51e0\u5927\u597d\u5904\u3002 <\/p>\n
\u3000\u30001\uff0c \u907f\u514d\u4e86\u540e\u95e8\u8986\u76d6\u9762\u592a\u5927\uff0c\u964d\u4f4e\u88ab\u53d1\u73b0\u7684\u98ce\u9669\u3002 <\/p>\n
\u3000\u30002\uff0c \u4ee3\u7801\u5f00\u53d1\u7ba1\u7406\u5458\u4e0d\u5fc5\u90fd\u77e5\u9053\u6709\u8fd9\u4e48\u4e00\u4e2a\u540e\u95e8\uff0c\u7b49\u7a0b\u5e8f\u5f00\u53d1\u5b8c\u6210\uff0c\u5c31\u7531\u67d0\u4e2a\u7279\u5b9a\u7684\u4eba\u628a\u6570\u636e\u5e93\u7684\u5b58\u50a8\u8fc7\u7a0b\u4e00\u6539\u3002 <\/p>\n
\u3000\u30003\uff0c \u5b58\u50a8\u8fc7\u7a0b\u53ef\u4ee5\u52a0\u5bc6\uff0c\u53c8\u964d\u4f4e\u4e86\u98ce\u9669\u3002 <\/p>\n
\u3000\u30004\uff0c \u5373\u4f7f\u66b4\u9732\uff0c\u53ef\u4ee5\u89e3\u91ca\u4e3a\u6d4b\u8bd5\u7a0b\u5e8f\u65f6\u9057\u7559\u7684\u5c0f\u95ee\u9898\u3002\u5229\u4e8e\u63a8\u5378\u8d23\u4efb\u3002 <\/p>\n
\u3000\u30005\uff0c \u6709\u4e00\u5929\u9700\u8981\u6e05\u9664\u540e\u95e8\uff0c\u53ea\u9700\u7ed9\u6570\u636e\u5e93\u52a0\u4e2aSQL\u6587\u4ef6\u8865\u4e01\u5c31\u53ef\u4ee5\u4e86\u3002 <\/p>\n
\u3000\u3000\u53ef\u4ee5\u60f3\u8c61\uff0c\u5982\u679c\u6211\u7ed9\u4f60\u4e2a\u8bd5\u7528\u7248\uff0c\u800c\u4f60\u4e00\u76f4\u4e0d\u4e70\u6b63\u7248\uff0c\u6211\u5bf9\u4f60\u4e0d\u6ee1\uff0c\u968f\u65f6\u53ef\u4ee5\u5728\u4efb\u4f55\u5730\u65b9\u767b\u9646\u4f60\u7684\u540e\u53f0\uff0c\u505a\u51fa\u4e00\u4e9b\u5408\u6cd5\uff08\u7a0b\u5e8f\u4e0a\u5141\u8bb8\uff09\u800c\u4e0d\u5408\u6cd5\uff08\u4f60\u4e0d\u5e0c\u671b\u51fa\u73b0\uff09\u7684\u64cd\u4f5c\uff0c\u7cfb\u7edf\u4e0a\u6ca1\u6709\u65e5\u5fd7\uff0c\u7136\u540e\u544a\u8bc9\u4f60\u8fd9\u4e2a\u201c\u73b0\u8c61\u201d\u5c5e\u4e8e\u8bd5\u7528\u7248BUG\u2026\uff08\u9ed1\u2026\u771f\u9ed1\u2026\uff09<\/p>\n","protected":false},"excerpt":{"rendered":"
\u4f5c\u8005\uff1a \u7a7a\u865a\u6d6a\u5b50\u5fc3 \u3000\u3000\u5728\u5f88\u591a\u5546\u4e1a\u7a0b\u5e8f\u4e2d,\u7a0b\u5e8f\u5458\u4e5f\u8bb8\u4f1a\u51fa\u4e8e\u67d0\u79cd\u76ee\u7684\uff0c\u5728\u7a0b\u5e8f\u4e2d\u7559\u4e0b …<\/p>\n