{"id":294387,"date":"2024-11-16T04:04:38","date_gmt":"2024-11-15T20:04:38","guid":{"rendered":"https:\/\/lrxjmw.cn\/zlxtzrhzkpbb.html"},"modified":"2024-11-16T04:04:38","modified_gmt":"2024-11-15T20:04:38","slug":"zlxtzrhzkpbb","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/zlxtzrhzkpbb.html","title":{"rendered":"\u5728 Linux \u7cfb\u7edf\u4e2d\u5982\u4f55\u67e5\u770b PHP \u7248\u672c\uff1f\u8be6\u7ec6\u6b65\u9aa4\u89e3\u6790"},"content":{"rendered":"

\u5728Linux<\/a>\u7cfb\u7edf\u91cc\u67e5\u770bPHP\u7248\u672c\u662f\u4e2a\u5e38\u89c1\u64cd\u4f5c\u3002\u8fd9\u6837\u505a\u80fd\u8ba9\u6211\u4eec\u6e05\u695a\u7cfb\u7edf\u91ccPHP\u7684\u8be6\u7ec6\u60c5\u51b5\u3002\u6bd4\u5982\uff0c\u5b83\u80fd\u544a\u8bc9\u6211\u4eec\u5f00\u53d1\u73af\u5883\u662f\u5426\u5408\u9002\uff0c\u662f\u5426\u9700\u8981\u5347\u7ea7PHP\u7248\u672c\u3002\u4e0b\u9762\u6211\u4f1a\u8be6\u7ec6\u8bf4\u660e\u8fd9\u4e2a\u8fc7\u7a0b\u3002<\/p>\n

\u547d\u4ee4<\/a>\u884c\u67e5\u770b<\/b><\/p>\n

\u67e5\u770b\u547d\u4ee4\u884c\u662f\u6700\u76f4\u63a5\u7684\u65b9\u6cd5\u3002\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u8f93\u5165php-v\u547d\u4ee4\u6765\u5b9e\u73b0\u3002\u8fd9\u4e2a\u547d\u4ee4\u65e2\u7b80\u5355\u53c8\u9ad8\u6548\uff0c\u53ea\u9700\u5728\u7ec8\u7aef\u6572\u5165\uff0c\u7cfb\u7edf\u4fbf\u4f1a\u7acb\u5373\u663e\u793a\u5df2\u5b89\u88c5\u7684PHP\u7248\u672c\u53ca\u5176\u7f16\u8bd1\u4fe1\u606f\u3002\u8fd9\u6837\uff0c\u6211\u4eec\u5c31\u80fd\u8fc5\u901f\u83b7\u53d6\u7248\u672c\u53f7\u53ca\u76f8\u5173\u7f16\u8bd1\u8be6\u60c5\u3002\u8fd9\u5bf9\u4e8e\u65b0\u63a5\u624b\u9879\u76ee\u6216\u642d\u5efa\u65b0\u73af\u5883\u5c24\u5176\u6709\u7528\uff0c\u80fd\u8fc5\u901f\u628a\u63e1PHP\u7248\u672c\u60c5\u51b5\u3002\u6b64\u5916\uff0c\u5728\u89e3\u51b3\u4e0ePHP\u7248\u672c\u76f8\u5173\u7684\u517c\u5bb9\u6027\u95ee\u9898\uff0c\u8fd9\u4e5f\u662f\u6211\u4eec\u9996\u9009\u7684\u68c0\u67e5\u624b\u6bb5\u3002<\/p>\n

\u4f7f\u7528php-version\u547d\u4ee4\u662f\u4e00\u79cd\u60c5\u51b5linux\u7cfb\u7edf\uff0c\u8fd9\u4e2a\u547d\u4ee4\u4e0ephp-v\u529f\u80fd\u76f8\u8fd1\uff0c\u4e8c\u8005\u90fd\u901a\u8fc7\u8c03\u7528PHP\u89e3\u6790\u5668\u6765\u83b7\u53d6\u5e76\u5c55\u793a\u7248\u672c\u4fe1\u606f\u3002\u4eba\u4eec\u53ef\u80fd\u4e60\u60ef\u4e8e\u4f7f\u7528\u4e0d\u540c\u7684\u65b9\u6cd5\uff0c\u4f46\u76ee\u7684\u90fd\u662f\u76f8\u540c\u7684\uff0c\u5373\u83b7\u53d6\u51c6\u786e\u7684PHP\u7248\u672c\u4fe1\u606f\u3002<\/p>\n

\u67e5\u770b\u7248\u672c\u4fe1\u606flinux_\u67e5\u770b\u7248\u672c\u53f7_linux\u67e5\u770bphp\u7248\u672c<\/p>\n

\u901a\u8fc7\u6587\u4ef6\u67e5\u770b<\/b><\/p>\n

\u6709\u65f6\u5019\uff0c\u6211\u4eec\u5f97\u6df1\u5165\u67e5\u9605PHP\u7684\u5177\u4f53\u7248\u672c\u4fe1\u606f\uff0c\u6216\u8bb8\u9700\u8981\u4ece\u6587\u6863\u8d44\u6599\u4e2d\u83b7\u53d6\u3002PHP\u5b89\u88c5\u76ee\u5f55\u4e2d\u85cf\u7740\u4e00\u4e2a\u540d\u4e3aphp.ini\u7684\u6587\u4ef6\uff0c\u5b83\u591a\u5c11\u80fd\u63ed\u793a\u51faPHP\u7684\u7248\u672c\u4fe1\u606f\u3002\u867d\u7136\u5b83\u7684\u4e3b\u8981\u529f\u80fd\u662f\u8bbe\u7f6ePHP\u7684\u53c2\u6570\uff0c\u4f46\u5176\u4e2d\u4e5f\u9690\u85cf\u7740\u7248\u672c\u7684\u76f8\u5173\u7ebf\u7d22\u3002\u6211\u4eec\u53ef\u5728\u6b64\u6587\u4ef6\u4e2d\u627e\u5230\u9488\u5bf9\u5b89\u88c5\u7684\u7279\u5b9a\u8bbe\u7f6e\u548c\u7248\u672c\u7279\u6709\u7684\u6807\u8bb0\u3002\u5f53\u7cfb\u7edf\u6743\u9650\u95ee\u9898\u6216\u5176\u4ed6\u5f02\u5e38\u5bfc\u81f4\u65e0\u6cd5\u4f7f\u7528php-v\u547d\u4ee4\u65f6\uff0c\u7814\u7a76php.ini\u6587\u4ef6\u6765\u67e5\u627e\u7248\u672c\u4fe1\u606f\u5c31\u53d8\u5f97\u5c24\u4e3a\u91cd\u8981\u4e86\u3002<\/p>\n

\u53e6\u5916\uff0c\u5728\u670d\u52a1\u5668\u4e0a\u82e5\u5e76\u5b58\u591a\u4e2aPHP\u7248\u672c\u4e14\u8bbe\u6709\u81ea\u5b9a\u914d\u7f6e\u6587\u4ef6\uff0c\u90a3\u4e48\u5bf9php.ini\u7684\u6df1\u5165\u63a2\u7a76\u5c06\u6709\u52a9\u4e8e\u6211\u4eec\u660e\u786e\uff0c\u5728\u7279\u5b9a\u9700\u6c42\u4e0b\uff0c\u7a76\u7adf\u54ea\u4e2a\u7248\u672c\u7684PHP\u88ab\u6fc0\u6d3b\u3002\u8fd9\u5bf9\u89e3\u51b3\u7248\u672c\u95f4\u7684\u51b2\u7a81\u6216\u51c6\u786e\u627e\u5230\u7279\u5b9a\u7248\u672cPHP\u7684\u914d\u7f6e\u95ee\u9898\u5927\u6709\u88e8\u76ca\u3002<\/p>\n

\u4f7f\u7528\u811a\u672c\u67e5\u770b<\/b><\/p>\n

\u6211\u4eec\u53ef\u4ee5\u7f16\u5199\u7b80\u5355\u7684\u811a\u672c\uff0c\u7528\u4e8e\u67e5\u770bPHP\u7684\u7248\u672c\u3002\u6bd4\u5982\uff0c\u53ef\u4ee5\u5199\u4e00\u4e2aPHP\u811a\u672c\uff0c\u7528\u6765\u8f93\u51fa\u7248\u672c\u4fe1\u606f\u3002\u8fd9\u79cd\u65b9\u6cd5\u5f88\u9002\u5408\u5c06\u67e5\u770b\u7248\u672c\u7684\u64cd\u4f5c\u878d\u5165\u81ea\u52a8\u5316\u4efb\u52a1\u6216\u76d1\u63a7\u7cfb\u7edf\u4e2d\u3002\u9996\u5148\uff0c\u521b\u5efa\u4e00\u4e2a\u540d\u4e3a\u201cversion.php\u201d\u7684\u6587\u4ef6\uff0c\u5e76\u5728\u5176\u4e2d\u8f93\u5165\u4ee3\u7801\u201c<?phpechophpversion();?>\u201d\u3002\u63a5\u7740\uff0c\u5728\u7ec8\u7aef\u91cc\u8fd0\u884c\u201cphpversion.php\u201d\u547d\u4ee4\uff0c\u5c31\u80fd\u770b\u5230PHP\u7684\u7248\u672c\u4fe1\u606f\u3002\u8fd9\u6837\u505a\u7684\u597d\u5904\u662f\uff0c\u53ef\u4ee5\u5728\u590d\u6742\u7684\u9879\u76ee\u7ed3\u6784\u6216\u7279\u5b9a\u7684\u5de5\u4f5c\u6d41\u7a0b\u4e2d\uff0c\u6709\u9488\u5bf9\u6027\u5730\u52a0\u5165\u67e5\u770b\u7248\u672c\u7684\u529f\u80fd\uff0c\u5e76\u5c06\u5176\u4e0e\u5176\u4ed6\u64cd\u4f5c\u7ed3\u5408\u8d77\u6765\u3002<\/p>\n

\u5728\u65e5\u5e38\u8fd0\u7ef4\u548c\u9879\u76ee\u7ba1\u7406\u4e2d\uff0c\u82e5\u9700\u7ba1\u7406\u4f17\u591a\u670d\u52a1\u5668\u6216\u73af\u5883\uff0c\u811a\u672c\u4fbf\u80fd\u6279\u91cf\u67e5\u770b\u7248\u672c\u4fe1\u606f\uff0c\u5e76\u636e\u6b64\u6267\u884c\u540e\u7eed\u5904\u7406\u3002\u76f8\u8f83\u4e8e\u9010\u4e2a\u624b\u52a8\u6267\u884c\u547d\u4ee4\u884clinux\u684c\u9762\uff0c\u6b64\u6cd5\u80fd\u663e\u8457\u63d0\u5347\u5de5\u4f5c\u6548\u7387\u3002<\/p>\n

\u67e5\u770b\u7279\u5b9a\u6a21\u5757\u4e2d\u7684\u7248\u672c<\/b><\/p>\n

\u5728PHP\u5f00\u53d1\u4e2dlinux\u67e5\u770bphp\u7248\u672c<\/strong>\uff0c\u6211\u4eec\u5e38\u9700\u4f7f\u7528\u67d0\u4e9b\u7279\u5b9a\u7684\u6269\u5c55\u6a21\u5757\u3002\u8fd9\u4e9b\u6a21\u5757\u53ef\u80fd\u4f1a\u6709\u5404\u81ea\u7684\u7248\u672c\u3002\u6bd4\u5982\uff0c\u9488\u5bf9PDO\u6a21\u5757\uff0c\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u547d\u4ee4\u884cphp-i|greppdo\u6765\u67e5\u770b\u6a21\u5757\u4e2dPHP\u7684\u7248\u672c\u4fe1\u606f\u7b49\u7ec6\u8282\u3002\u8fd9\u6837\u7684\u505a\u6cd5\u80fd\u5e2e\u52a9\u6211\u4eec\u5728\u5f00\u53d1\u4e2d\u786e\u4fdd\u4f7f\u7528\u7684\u6a21\u5757\u7248\u672c\u4e0e\u9879\u76ee\u8981\u6c42\u76f8\u5339\u914d\u3002\u4e00\u65e6\u53d1\u73b0\u6a21\u5757\u7248\u672c\u4e0e\u9879\u76ee\u9700\u6c42\u4e0d\u5339\u914d\uff0c\u6211\u4eec\u4fbf\u53ef\u4ee5\u53ca\u65f6\u8c03\u6574\u7248\u672c\u6216\u66f4\u6362\u6a21\u5757\u3002<\/p>\n

\u53e6\u5916\uff0c\u5f53\u591a\u4e2a\u6a21\u5757\u534f\u540c\u8fd0\u4f5c\u4e14\u5f7c\u6b64\u95f4\u5b58\u5728\u76f8\u4e92\u4f5c\u7528\u65f6\uff0c\u68c0\u67e5\u6bcf\u4e2a\u6a21\u5757\u6240\u4f7f\u7528\u7684PHP\u7248\u672c\u53d8\u5f97\u5c24\u4e3a\u5173\u952e\u3002\u4e0d\u540c\u7684\u6a21\u5757PHP\u7248\u672c\u53ef\u80fd\u4f1a\u5bf9\u9879\u76ee\u7684\u6574\u4f53\u6027\u80fd\u6216\u8fd0\u884c\u7ed3\u679c\u9020\u6210\u663e\u8457\u5f71\u54cd\u3002\u56e0\u6b64\uff0c\u51c6\u786e\u638c\u63e1\u8fd9\u4e9b\u4fe1\u606f\u5bf9\u4e8e\u786e\u4fddPHP\u73af\u5883\u7684\u7a33\u5b9a\u8fd0\u884c\u81f3\u5173\u91cd\u8981\u3002<\/p>\n

\u5bb9\u5668\u73af\u5883\u4e2d\u7684\u67e5\u770b<\/b><\/p>\n

\u5bb9\u5668\u5316\u6280\u672f\u65e5\u76ca\u666e\u53ca\uff0c\u800c\u5728\u5bb9\u5668\u5185\u67e5\u770bPHP\u7248\u672c\u7684\u64cd\u4f5c\u4e5f\u7565\u6709\u533a\u522b\u3002\u82e5\u662f\u5728Docker\u5bb9\u5668\u5185\uff0c\u9700\u5148\u8fdb\u5165\u5bb9\u5668\u5185\u90e8\uff0c\u518d\u6267\u884c\u5982php-v\u7b49\u547d\u4ee4\u3002\u901a\u8fc7\u547d\u4ee4dockerexec-it[\u5bb9\u5668\u540d]bash\u5373\u53ef\u8fdb\u5165\u5bb9\u5668\uff0c\u4e4b\u540e\u6309\u5e38\u89c4\u65b9\u6cd5\u67e5\u770b\u3002\u5728\u5bb9\u5668\u73af\u5883\u4e2d\uff0c\u5404\u5bb9\u5668\u53ef\u80fd\u914d\u7f6e\u4e86\u4e0d\u540c\u7684PHP\u7248\u672c\uff0c\u8fd9\u4e3b\u8981\u53d6\u51b3\u4e8e\u5176\u7528\u9014\u53ca\u521b\u5efa\u65f6\u7684\u914d\u7f6e\u3002<\/p>\n

\u5728Kubernetes\u73af\u5883\u4e2d\uff0c\u9488\u5bf9Pod\u7684\u64cd\u4f5c\uff0c\u6211\u4eec\u8fdb\u5165\u5bb9\u5668\u5185\u90e8\u8fdb\u884c\u67e5\u770b\uff0c\u8fd9\u4e0eDocker\u5bb9\u5668\u7684\u64cd\u4f5c\u65b9\u5f0f\u76f8\u4f3c\u3002\u5728\u5bb9\u5668\u5316\u73af\u5883\u4e2d\uff0c\u7248\u672c\u67e5\u770b\u7684\u5173\u952e\u5728\u4e8e\u5982\u4f55\u786e\u4fdd\u5b89\u5168\u5730\u8fdb\u5165\u5bb9\u5668\uff0c\u4ee5\u53ca\u5728\u5bb9\u5668\u96c6\u7fa4\u7ba1\u7406\u4e2d\uff0c\u5982\u4f55\u5bf9\u6bcf\u4e2a\u5bb9\u5668\u4e2d\u7684PHP\u7248\u672c\u8fdb\u884c\u6709\u6548\u7684\u7ef4\u62a4\u548c\u66f4\u65b0\u3002<\/p>\n

\u67e5\u770b\u7248\u672c\u4fe1\u606flinux_linux\u67e5\u770bphp\u7248\u672c_\u67e5\u770b\u7248\u672c\u53f7<\/p>\n

\u4ece\u6587\u6863\u67e5\u770b\u7248\u672c<\/b><\/p>\n

\u6587\u6863\u662f\u4e00\u4e2a\u4e0d\u5bb9\u5ffd\u89c6\u7684\u5173\u952e\u4fe1\u606f\u6765\u6e90\u3002\u5728\u7cfb\u7edf\u5b89\u88c5\u6216\u9879\u76ee\u76f8\u5173\u7684\u6587\u6863\u4e2d\uff0c\u5f80\u5f80\u80fd\u627e\u5230PHP\u7684\u7248\u672c\u8bb0\u5f55\u3002\u8fd9\u6709\u52a9\u4e8e\u6211\u4eec\u56de\u987e\u8fc7\u5f80\u7684\u7248\u672c\u72b6\u51b5\uff0c\u4ea6\u6216\u662f\u5728\u65e0\u6cd5\u76f4\u63a5\u64cd\u4f5c\u7684\u60c5\u51b5\u4e0b\u8fdb\u884c\u7248\u672c\u67e5\u8be2\u3002\u8fd9\u4e9b\u6587\u6863\u53ef\u80fd\u7531\u5f00\u53d1\u4eba\u5458\u7f16\u5199\uff0c\u4e5f\u53ef\u80fd\u662f\u8fd0\u7ef4\u4eba\u5458\u7559\u4e0b\u7684\u64cd\u4f5c\u8bb0\u5f55\u3002\u901a\u8fc7\u8fd9\u4e9b\u6587\u6863\uff0c\u6211\u4eec\u751a\u81f3\u53ef\u4ee5\u8ffd\u8e2a\u5230\u9879\u76ee\u5386\u53f2\u4e2dPHP\u7248\u672c\u7684\u6f14\u53d8\u5386\u7a0b\u3002<\/p>\n

\u6587\u6863\u4e2d\u6216\u8bb8\u4f1a\u63d0\u53ca\u4e0e\u7248\u672c\u6709\u5173\u7684\u7279\u522b\u63d0\u793a\uff0c\u8fd8\u6709\u7248\u672c\u5347\u7ea7\u7684\u8bb0\u5f55\u7b49\u4fe1\u606f\u3002\u8fd9\u4e9b\u5185\u5bb9\u80fd\u8ba9\u6211\u4eec\u66f4\u6e05\u695a\u5730\u660e\u767d\u4e3a\u4f55\u7cfb\u7edf\u9009\u62e9\u4e86\u8fd9\u4e2a\u7248\u672c\u7684PHPlinux\u67e5\u770bphp\u7248\u672c<\/strong>\uff0c\u4ee5\u53ca\u5728\u4e0d\u540c\u65f6\u671f\u7248\u672c\u66f4\u66ff\u65f6\u7684\u5404\u79cd\u5f71\u54cd\u56e0\u7d20\u3002<\/p>\n

\u6211\u60f3\u8bf7\u6559\u5404\u4f4d\u8bfb\u8005\uff0c\u5f53\u4f60\u4eec\u67e5\u770bPHP\u7248\u672c\u65f6\uff0c\u6700\u5e38\u9047\u5230\u7684\u95ee\u9898\u7a76\u7adf\u662f\u4ec0\u4e48\uff1f\u671f\u5f85\u5927\u5bb6\u7684\u70ed\u60c5\u53c2\u4e0e\uff0c\u6b22\u8fce\u8bc4\u8bba\u3001\u70b9\u8d5e\u4ee5\u53ca\u5206\u4eab\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"

\u5728Linux\u7cfb\u7edf\u91cc\u67e5\u770bPHP\u7248\u672c\u662f\u4e2a\u5e38\u89c1\u64cd\u4f5c\u3002\u6211\u4eec\u53ef\u4ee5\u7f16\u5199\u7b80\u5355\u7684\u811a\u672c\uff0c\u7528\u4e8e\u67e5\u770bPHP\u7684\u7248\u672c\u3002\u67e5\u770b\u7279\u5b9a\u6a21\u5757\u4e2d\u7684\u7248\u672c\u6bd4\u5982\uff0c\u9488\u5bf9PDO\u6a21\u5757\uff0c\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u547d\u4ee4\u884cphp-i|greppdo\u6765\u67e5\u770b\u6a21\u5757\u4e2dPHP\u7684\u7248\u672c\u4fe1\u606f\u7b49\u7ec6\u8282\u3002\u5728\u7cfb\u7edf\u5b89\u88c5\u6216\u9879\u76ee\u76f8\u5173\u7684\u6587\u6863\u4e2d\uff0c\u5f80\u5f80\u80fd\u627e\u5230PHP\u7684\u7248\u672c\u8bb0\u5f55\u3002<\/p>\n","protected":false},"author":1,"featured_media":294388,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[988],"tags":[4294,4292,4291,4293,2761],"class_list":["post-294387","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tougao","tag-PDO","tag-php-v","tag-php-version","tag-phpini","tag-bbxx"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/294387","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=294387"}],"version-history":[{"count":0,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/294387\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/294388"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=294387"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=294387"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=294387"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}