{"id":757,"date":"2025-08-04T09:40:44","date_gmt":"2025-08-04T00:40:44","guid":{"rendered":"https:\/\/nexive.tech\/?p=757"},"modified":"2025-08-04T09:40:44","modified_gmt":"2025-08-04T00:40:44","slug":"%e3%80%90%e3%82%b5%e3%82%af%e3%83%83%e3%81%a8%e8%a7%a3%e8%aa%ac%e3%80%91php%e3%81%ae%e5%a4%89%e6%95%b0%e3%82%b9%e3%82%b3%e3%83%bc%e3%83%97%ef%bc%88global-static-superglobal%ef%bc%89","status":"publish","type":"post","link":"https:\/\/nexive.tech\/?p=757","title":{"rendered":"\u3010\u30b5\u30af\u30c3\u3068\u89e3\u8aac\u3011PHP\u306e\u5909\u6570\u30b9\u30b3\u30fc\u30d7\uff08global\/static\/superglobal\uff09"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">1. \u672c\u8a18\u4e8b\u306e\u30dd\u30a4\u30f3\u30c8<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>PHP\u306e\u5909\u6570\u30b9\u30b3\u30fc\u30d7\u306e\u7a2e\u985e\uff08global, static, superglobal\uff09\u3092\u6574\u7406<\/li>\n\n\n\n<li>\u5b9f\u884c\u6642\u306e\u30b9\u30b3\u30fc\u30d7\u306e\u52d5\u304d\u3068\u3001\u4f7f\u3044\u5206\u3051\u306e\u8a2d\u8a08\u5224\u65ad\u3092\u5177\u4f53\u4f8b\u3067\u89e3\u8aac<\/li>\n\n\n\n<li>\u3088\u304f\u3042\u308b\u8aa4\u89e3\u3084\u843d\u3068\u3057\u7a74\u3082\u5408\u308f\u305b\u3066\u78ba\u8a8d<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">2. PHP\u306e\u5909\u6570\u30b9\u30b3\u30fc\u30d7\u3068\u306f\uff1f<\/h2>\n\n\n\n<p>PHP\u3067\u306f\u3001\u5909\u6570\u304c\u3069\u3053\u3067\u5ba3\u8a00\u30fb\u4f7f\u7528\u3055\u308c\u308b\u304b\u306b\u3088\u3063\u3066\u30b9\u30b3\u30fc\u30d7\uff08\u6709\u52b9\u7bc4\u56f2\uff09\u304c\u7570\u306a\u308a\u307e\u3059\u3002<br>\u7279\u306b\u3001\u95a2\u6570\u5185\u5916\u3067\u306e\u5909\u6570\u306e\u6319\u52d5\u306b\u306f\u660e\u78ba\u306a\u30eb\u30fc\u30eb\u304c\u3042\u308a\u3001\u7121\u7406\u89e3\u306e\u307e\u307e\u4f7f\u3046\u3068\u610f\u56f3\u3057\u306a\u3044\u52d5\u4f5c\u3092\u62db\u304d\u3084\u3059\u304f\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u4e3b\u306a\u30b9\u30b3\u30fc\u30d7\u306e\u7a2e\u985e\u306f\u4ee5\u4e0b\u306e3\u3064\u3067\u3059\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u30ed\u30fc\u30ab\u30eb\u30b9\u30b3\u30fc\u30d7<\/strong>\uff1a\u95a2\u6570\u3084\u30e1\u30bd\u30c3\u30c9\u5185\u3067\u5ba3\u8a00\u3055\u308c\u305f\u5909\u6570\u306f\u3001\u305d\u306e\u95a2\u6570\u306e\u4e2d\u3067\u306e\u307f\u6709\u52b9\u3067\u3059\u3002<\/li>\n\n\n\n<li><strong>\u30b0\u30ed\u30fc\u30d0\u30eb\u30b9\u30b3\u30fc\u30d7\uff08global\uff09<\/strong>\uff1a\u95a2\u6570\u306e\u5916\u3067\u5ba3\u8a00\u3055\u308c\u305f\u5909\u6570\u3002\u95a2\u6570\u5185\u3067\u30a2\u30af\u30bb\u30b9\u3059\u308b\u306b\u306f<code>global<\/code>\u5ba3\u8a00\u304c\u5fc5\u8981\u3067\u3059\u3002<\/li>\n\n\n\n<li><strong>\u9759\u7684\u30b9\u30b3\u30fc\u30d7\uff08static\uff09<\/strong>\uff1a\u95a2\u6570\u5185\u3067<code>static<\/code>\u4fee\u98fe\u5b50\u4ed8\u304d\u3067\u5ba3\u8a00\u3055\u308c\u305f\u5909\u6570\u306f\u3001\u95a2\u6570\u547c\u3073\u51fa\u3057\u306e\u305f\u3073\u306b\u521d\u671f\u5316\u3055\u308c\u305a\u3001\u524d\u56de\u306e\u5024\u304c\u4fdd\u6301\u3055\u308c\u307e\u3059\u3002<\/li>\n\n\n\n<li><strong>\u30b9\u30fc\u30d1\u30fc\u30b0\u30ed\u30fc\u30d0\u30eb\uff08superglobal\uff09<\/strong>\uff1a<code>$_GET<\/code>\u3084<code>$_POST<\/code>\u306a\u3069\u3001PHP\u304c\u30b0\u30ed\u30fc\u30d0\u30eb\u306b\u63d0\u4f9b\u3059\u308b\u4e88\u7d04\u6e08\u307f\u5909\u6570\u7fa4\u3067\u3059\u3002<\/li>\n<\/ul>\n\n\n\n<p>\u5b9f\u52d9\u3067\u306f\u3001\u30b9\u30b3\u30fc\u30d7\u306e\u8aa4\u89e3\u304c\u30d0\u30b0\u306e\u539f\u56e0\u306b\u306a\u308b\u30b1\u30fc\u30b9\u304c\u591a\u304f\u3001\u660e\u793a\u7684\u306b\u4f7f\u3044\u5206\u3051\u308b\u610f\u8b58\u304c\u91cd\u8981\u3067\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">3. \u8a73\u7d30\u89e3\u8aac<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">\u30b0\u30ed\u30fc\u30d0\u30eb\u5909\u6570\u3068global\u5ba3\u8a00<\/h3>\n\n\n\n<p>\u95a2\u6570\u5185\u3067\u30b0\u30ed\u30fc\u30d0\u30eb\u5909\u6570\u306b\u30a2\u30af\u30bb\u30b9\u3059\u308b\u306b\u306f\u3001<code>global<\/code>\u30ad\u30fc\u30ef\u30fc\u30c9\u304c\u5fc5\u8981\u3067\u3059\u3002<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#D4D4D4;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:16px 0 0 16px;width:100%;text-align:left;background-color:#1e1e1e\"><span style=\"background:#c7c7c7;padding:0.3rem 0.5rem 0.2rem;border-radius:1rem;font-size:0.8em;line-height:1;height:1.25rem;text-align:center;display:inline-flex;align-items:center;justify-content:center;color:#1e1e1e\">PHP<\/span><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#D4D4D4;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>$a = 10;\n\nfunction showGlobal() {\n    global $a; \/\/ \u5916\u306e$a\u3092\u53c2\u7167\n    echo $a; \/\/ \u51fa\u529b: 10\n}\n\nshowGlobal();\n<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki dark-plus\" style=\"background-color: #1E1E1E\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #9CDCFE\">$a<\/span><span style=\"color: #D4D4D4\"> = <\/span><span style=\"color: #B5CEA8\">10<\/span><span style=\"color: #D4D4D4\">;<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #569CD6\">function<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #DCDCAA\">showGlobal<\/span><span style=\"color: #D4D4D4\">() {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">    <\/span><span style=\"color: #569CD6\">global<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #9CDCFE\">$a<\/span><span style=\"color: #D4D4D4\">; <\/span><span style=\"color: #6A9955\">\/\/ \u5916\u306e$a\u3092\u53c2\u7167<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">    <\/span><span style=\"color: #DCDCAA\">echo<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #9CDCFE\">$a<\/span><span style=\"color: #D4D4D4\">; <\/span><span style=\"color: #6A9955\">\/\/ \u51fa\u529b: 10<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">}<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #DCDCAA\">showGlobal<\/span><span style=\"color: #D4D4D4\">();<\/span><\/span>\n<span class=\"line\"><\/span><\/code><\/pre><\/div>\n\n\n\n<p>\u30b0\u30ed\u30fc\u30d0\u30eb\u5909\u6570\u3092\u76f4\u63a5\u95a2\u6570\u5185\u3067\u4f7f\u3046\u3068\u3001\u672a\u5b9a\u7fa9\u3068\u3057\u3066\u6271\u308f\u308c\u307e\u3059\u3002\u660e\u793a\u7684\u306b<code>global<\/code>\u3092\u6307\u5b9a\u3059\u308b\u3053\u3068\u3067\u30a2\u30af\u30bb\u30b9\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u9759\u7684\u5909\u6570\uff08static\uff09\u306e\u52d5\u4f5c<\/h3>\n\n\n\n<p>\u95a2\u6570\u306e\u547c\u3073\u51fa\u3057\u9593\u3067\u5024\u3092\u4fdd\u6301\u3059\u308b\u7528\u9014\u306b\u4fbf\u5229\u3067\u3059\u3002<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#D4D4D4;--cbp-line-number-width:calc(2 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:16px 0 0 16px;width:100%;text-align:left;background-color:#1e1e1e\"><span style=\"background:#c7c7c7;padding:0.3rem 0.5rem 0.2rem;border-radius:1rem;font-size:0.8em;line-height:1;height:1.25rem;text-align:center;display:inline-flex;align-items:center;justify-content:center;color:#1e1e1e\">PHP<\/span><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#D4D4D4;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>function counter() {\n    static $count = 0;\n    $count++;\n    echo $count . \"\\n\";\n}\n\ncounter(); \/\/ \u51fa\u529b: 1\ncounter(); \/\/ \u51fa\u529b: 2\ncounter(); \/\/ \u51fa\u529b: 3\n<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki dark-plus\" style=\"background-color: #1E1E1E\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #569CD6\">function<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #DCDCAA\">counter<\/span><span style=\"color: #D4D4D4\">() {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">    <\/span><span style=\"color: #569CD6\">static<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #9CDCFE\">$count<\/span><span style=\"color: #D4D4D4\"> = <\/span><span style=\"color: #B5CEA8\">0<\/span><span style=\"color: #D4D4D4\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">    <\/span><span style=\"color: #9CDCFE\">$count<\/span><span style=\"color: #D4D4D4\">++;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">    <\/span><span style=\"color: #DCDCAA\">echo<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #9CDCFE\">$count<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #D4D4D4\">.<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #CE9178\">&quot;<\/span><span style=\"color: #D7BA7D\">\\n<\/span><span style=\"color: #CE9178\">&quot;<\/span><span style=\"color: #D4D4D4\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">}<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #DCDCAA\">counter<\/span><span style=\"color: #D4D4D4\">(); <\/span><span style=\"color: #6A9955\">\/\/ \u51fa\u529b: 1<\/span><\/span>\n<span class=\"line\"><span style=\"color: #DCDCAA\">counter<\/span><span style=\"color: #D4D4D4\">(); <\/span><span style=\"color: #6A9955\">\/\/ \u51fa\u529b: 2<\/span><\/span>\n<span class=\"line\"><span style=\"color: #DCDCAA\">counter<\/span><span style=\"color: #D4D4D4\">(); <\/span><span style=\"color: #6A9955\">\/\/ \u51fa\u529b: 3<\/span><\/span>\n<span class=\"line\"><\/span><\/code><\/pre><\/div>\n\n\n\n<p>\u6bce\u56de\u521d\u671f\u5316\u3055\u308c\u308b\u901a\u5e38\u306e\u30ed\u30fc\u30ab\u30eb\u5909\u6570\u3068\u7570\u306a\u308a\u3001<code>static<\/code>\u5909\u6570\u306f\u95a2\u6570\u306e\u30b9\u30b3\u30fc\u30d7\u5185\u306b\u9589\u3058\u306a\u304c\u3089\u3082\u72b6\u614b\u3092\u4fdd\u6301\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u30b9\u30fc\u30d1\u30fc\u30b0\u30ed\u30fc\u30d0\u30eb\u5909\u6570\u306e\u4f7f\u7528\u4f8b<\/h3>\n\n\n\n<p>POST\u30c7\u30fc\u30bf\u306a\u3069\u306b\u30a2\u30af\u30bb\u30b9\u3059\u308b\u5834\u5408\u306b\u4f7f\u7528\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#D4D4D4;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:16px 0 0 16px;width:100%;text-align:left;background-color:#1e1e1e\"><span style=\"background:#c7c7c7;padding:0.3rem 0.5rem 0.2rem;border-radius:1rem;font-size:0.8em;line-height:1;height:1.25rem;text-align:center;display:inline-flex;align-items:center;justify-content:center;color:#1e1e1e\">PHP<\/span><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#D4D4D4;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>\/\/ \u30d5\u30a9\u30fc\u30e0\u304b\u3089\u306ePOST\u30c7\u30fc\u30bf\u3092\u53d7\u3051\u53d6\u308b\n$name = $_POST&#91;'name'&#93; ?? '\u672a\u5165\u529b';\necho htmlspecialchars($name);\n<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki dark-plus\" style=\"background-color: #1E1E1E\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #6A9955\">\/\/ \u30d5\u30a9\u30fc\u30e0\u304b\u3089\u306ePOST\u30c7\u30fc\u30bf\u3092\u53d7\u3051\u53d6\u308b<\/span><\/span>\n<span class=\"line\"><span style=\"color: #9CDCFE\">$name<\/span><span style=\"color: #D4D4D4\"> = <\/span><span style=\"color: #9CDCFE\">$_POST<\/span><span style=\"color: #D4D4D4\">&#91;<\/span><span style=\"color: #CE9178\">&#39;name&#39;<\/span><span style=\"color: #D4D4D4\">&#93; ?? <\/span><span style=\"color: #CE9178\">&#39;\u672a\u5165\u529b&#39;<\/span><span style=\"color: #D4D4D4\">;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #DCDCAA\">echo<\/span><span style=\"color: #D4D4D4\"> <\/span><span style=\"color: #DCDCAA\">htmlspecialchars<\/span><span style=\"color: #D4D4D4\">(<\/span><span style=\"color: #9CDCFE\">$name<\/span><span style=\"color: #D4D4D4\">);<\/span><\/span>\n<span class=\"line\"><\/span><\/code><\/pre><\/div>\n\n\n\n<p>\u30b9\u30fc\u30d1\u30fc\u30b0\u30ed\u30fc\u30d0\u30eb\u5909\u6570\u306f\u5e38\u306b\u30b0\u30ed\u30fc\u30d0\u30eb\u30b9\u30b3\u30fc\u30d7\u306b\u5b58\u5728\u3057\u3001\u95a2\u6570\u5185\u3067\u3082\u76f4\u63a5\u30a2\u30af\u30bb\u30b9\u53ef\u80fd\u3067\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">4. \u3088\u304f\u3042\u308b\u30df\u30b9\u30fb\u8aa4\u89e3\u30fb\u843d\u3068\u3057\u7a74<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>global<\/code>\u30ad\u30fc\u30ef\u30fc\u30c9\u306e\u7701\u7565\u306b\u3088\u308a\u3001\u95a2\u6570\u5185\u3067\u5909\u6570\u304c\u672a\u5b9a\u7fa9\u306b\u306a\u308b<\/li>\n\n\n\n<li><code>static<\/code>\u3092\u4f7f\u3044\u5fd8\u308c\u3066\u6bce\u56de\u521d\u671f\u5316\u3055\u308c\u3066\u3057\u307e\u3046<\/li>\n\n\n\n<li>\u30b9\u30fc\u30d1\u30fc\u30b0\u30ed\u30fc\u30d0\u30eb\u5909\u6570\u306b\u76f4\u63a5\u4ee3\u5165\u3057\u3066\u72b6\u614b\u3092\u6301\u305f\u305b\u3088\u3046\u3068\u3059\u308b\uff08\u8a2d\u8a08\u4e0a\u907f\u3051\u308b\u3079\u304d\uff09<\/li>\n\n\n\n<li><code>$_POST<\/code>\u3084<code>$_GET<\/code>\u306b\u672a\u5b9a\u7fa9\u30ad\u30fc\u3092\u30a2\u30af\u30bb\u30b9\u3057\u3066<code>undefined index<\/code>\u30a8\u30e9\u30fc\u304c\u51fa\u308b<\/li>\n<\/ul>\n\n\n\n<p>\u307e\u305f\u3001\u30b0\u30ed\u30fc\u30d0\u30eb\u5909\u6570\u306e\u591a\u7528\u306f\u53ef\u8aad\u6027\u30fb\u4fdd\u5b88\u6027\u3092\u4e0b\u3052\u308b\u305f\u3081\u3001\u539f\u5247\u7684\u306b\u95a2\u6570\u9593\u306e\u72b6\u614b\u5171\u6709\u306b\u306f\u4f9d\u5b58\u6ce8\u5165\u3084\u623b\u308a\u5024\u306e\u6d3b\u7528\u304c\u63a8\u5968\u3055\u308c\u307e\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">5. \u307e\u3068\u3081<\/h2>\n\n\n\n<p>PHP\u306e\u5909\u6570\u30b9\u30b3\u30fc\u30d7\u306f\u3001\u30b3\u30fc\u30c9\u306e\u898b\u901a\u3057\u3084\u610f\u56f3\u306e\u660e\u793a\u306b\u76f4\u7d50\u3059\u308b\u91cd\u8981\u306a\u6982\u5ff5\u3067\u3059\u3002<br><code>global<\/code>\u306f\u95a2\u6570\u5185\u3067\u306e\u5916\u90e8\u5909\u6570\u53c2\u7167\u306b\u5fc5\u9808\u3001<code>static<\/code>\u306f\u72b6\u614b\u4fdd\u6301\u306b\u6709\u52b9\u3001\u30b9\u30fc\u30d1\u30fc\u30b0\u30ed\u30fc\u30d0\u30eb\u306f\u30ea\u30af\u30a8\u30b9\u30c8\u60c5\u5831\u306e\u53d7\u3051\u53e3\u3068\u3057\u3066\u6a5f\u80fd\u3057\u307e\u3059\u3002<br>\u7279\u306b\u30b0\u30ed\u30fc\u30d0\u30eb\u5909\u6570\u3068\u30b9\u30fc\u30d1\u30fc\u30b0\u30ed\u30fc\u30d0\u30eb\u306e\u4f7f\u3044\u5206\u3051\u306f\u8a2d\u8a08\u306b\u5f71\u97ff\u3059\u308b\u305f\u3081\u3001\u30b9\u30b3\u30fc\u30d7\u306e\u7279\u6027\u3092\u6b63\u78ba\u306b\u7406\u89e3\u3057\u3066\u4f7f\u3044\u5206\u3051\u307e\u3057\u3087\u3046\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>1. \u672c\u8a18\u4e8b\u306e\u30dd\u30a4\u30f3\u30c8 2. PHP\u306e\u5909\u6570\u30b9\u30b3\u30fc\u30d7\u3068\u306f\uff1f PHP\u3067\u306f\u3001\u5909\u6570\u304c\u3069\u3053\u3067\u5ba3\u8a00\u30fb\u4f7f\u7528\u3055\u308c\u308b\u304b\u306b\u3088\u3063\u3066\u30b9\u30b3\u30fc\u30d7\uff08\u6709\u52b9\u7bc4\u56f2\uff09\u304c\u7570\u306a\u308a\u307e\u3059\u3002\u7279\u306b\u3001\u95a2\u6570\u5185\u5916\u3067\u306e\u5909\u6570\u306e\u6319\u52d5\u306b\u306f\u660e\u78ba\u306a\u30eb\u30fc\u30eb\u304c\u3042\u308a\u3001\u7121\u7406\u89e3\u306e\u307e\u307e\u4f7f\u3046\u3068\u610f\u56f3\u3057\u306a [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":563,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"swell_btn_cv_data":"","footnotes":""},"categories":[85],"tags":[],"class_list":["post-757","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-php"],"_links":{"self":[{"href":"https:\/\/nexive.tech\/index.php?rest_route=\/wp\/v2\/posts\/757","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nexive.tech\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nexive.tech\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nexive.tech\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/nexive.tech\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=757"}],"version-history":[{"count":2,"href":"https:\/\/nexive.tech\/index.php?rest_route=\/wp\/v2\/posts\/757\/revisions"}],"predecessor-version":[{"id":769,"href":"https:\/\/nexive.tech\/index.php?rest_route=\/wp\/v2\/posts\/757\/revisions\/769"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/nexive.tech\/index.php?rest_route=\/wp\/v2\/media\/563"}],"wp:attachment":[{"href":"https:\/\/nexive.tech\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=757"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nexive.tech\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=757"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nexive.tech\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=757"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}