{"id":90189,"date":"2026-08-04T19:49:32","date_gmt":"2026-08-04T11:49:32","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/90189.html"},"modified":"2026-08-04T19:49:32","modified_gmt":"2026-08-04T11:49:32","slug":"%e5%88%9d%e8%af%86php","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/90189.html","title":{"rendered":"\u521d\u8bc6PHP"},"content":{"rendered":"<h2>\u4e00\u3001PHP\u6807\u51c6\u8bed\u8a00\u683c\u5f0f<\/h2>\n<p>PHP\u8bed\u8a00\u6807\u8bb0&#xff1a;<\/p>\n<p>&lt;?php           \/\/ PHP \u7684\u5f00\u59cb\u6807\u8bb0&#xff0c;\u8868\u793a\u4ece\u6b64\u6807\u8bb0\u5f00\u59cb&#xff0c;\u8fdb\u5165PHP \u6a21\u5f0f\u3002<br \/>\n    phpinfo();  \/\/ PHP \u4ee3\u7801<br \/>\n                \/\/ PHP \u7684\u7ed3\u675f\u6807\u8bb0&#xff0c;\u8868\u793a\u4ece\u5f00\u59cb\u6807\u8bb0\u5230\u7ed3\u675f\u6807\u8bb0&#xff0c;\u4e4b\u95f4\u7684\u5185\u5bb9\u662fPHP \u6a21\u5f0f<br \/>\n                \/\/ \u4e4b\u540e\u7684\u5185\u5bb9\u4f9d\u7136\u88abPHP \u89e3\u91ca\u5f15\u64ce\u8ba4\u4e3a\u662f\u7eaf\u6587\u672c\u5b57\u7b26\u4e32\u3002<br \/>\n?&gt;<\/p>\n<p>PHP\u7528\u901a\u4fd7\u7684\u8bdd\u6765\u8bb2\u5b83\u662f\u6bd4\u8f83\u968f\u610f\u7684\u4e00\u4e2a\u8bed\u8a00&#xff0c;\u5728PHP\u6587\u4ef6\u4e2d&#xff0c;\u91cc\u9762\u53ef\u4ee5\u63ba\u6742\u7740HTML\u548cJavaScript\u8fdb\u884c\u6df7\u7f16\u3002<\/p>\n<p>PHP\u7684\u5f00\u59cb\u6807\u8bb0\u4e3a&#xff1a;&lt;?php \u7ed3\u675f\u6807\u8bb0\u4e3a&#xff1a;?&gt; &#xff0c;\u5206\u53f7;\u4ee3\u8868\u4e00\u53e5\u8bdd\u4ee3\u7801\u7ed3\u675f\u3002\/\/\u4ee3\u8868\u6ce8\u91ca&#xff0c;\/\/\u540e\u9762\u7684\u5185\u5bb9\u4e0d\u4f1a\u88ab\u6267\u884c\u3002\u800c\u5728\u8fd9\u6807\u8bb0\u4e4b\u5916\u7684\u5185\u5bb9&#xff0c;\u5b83\u4eec\u4f1a\u88ab\u5f53\u4f5c\u5b57\u7b26\u8f93\u51fa\u5230\u6d4f\u89c8\u5668\u4e2d\u3002\u4f8b\u5982&#xff1a;<\/p>\n<p style=\"text-align:center\"><img decoding=\"async\" alt=\"\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/08\/20260804114929-6a71d1c972415.png\" \/><\/p>\n<p>\u53ef\u4ee5\u770b\u5230\u4e0a\u9762\u7684sad sad sad\u5185\u5bb9\u6211\u4eec\u5e76\u6ca1\u6709\u505a\u4efb\u4f55\u5904\u7406&#xff0c;\u5b83\u4eec\u76f4\u63a5\u8f93\u51fa\u5230\u6d4f\u89c8\u5668\u4e2d\u3002<\/p>\n<p>\u5bf9\u4e8e\u7f51\u7edc\u5b89\u5168\u6765\u8bb2&#xff0c;\u5982\u679c\u5728\u4e00\u4e2a\u5728\u7ebf\u7f51\u7ad9\u4e0a\u627e\u5230\u4e86phpinfo\u9875\u9762&#xff0c;\u8bf4\u660e\u5b58\u5728\u654f\u611f\u4fe1\u606f\u6cc4\u9732\u6f0f\u6d1e\u3002<\/p>\n<h2>\u4e8c\u3001\u5b57&#043;\u5b57\u7b26\u4e32\u6df7\u642d\u8fd0\u7b97<\/h2>\n<p>\u540e\u9762\u7684\u5185\u5bb9\u6211\u4eec\u7528\u4e00\u4e9b\u5c0f\u7ec3\u4e60\u6765\u8fdb\u884c\u89e3\u91ca&#xff1a;<\/p>\n<p>&lt;?php<\/p>\n<p>$a &#061; 10;<\/p>\n<p>$b &#061; &#034;20test&#034;;<\/p>\n<p>echo $a &#043; $b;<\/p>\n<p>?&gt;<\/p>\n<p style=\"margin-left:0.0001pt;text-align:center\"><img decoding=\"async\" alt=\"\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/08\/20260804114929-6a71d1c9ae6df.png\" \/><\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">\u5728PHP\u4e2d&#xff0c;&#043; \u8fd0\u7b97\u7b26\u662f\u7b97\u672f\u52a0\u6cd5\u8fd0\u7b97\u7b26&#xff0c;\u5177\u6709\u660e\u786e\u7684\u6570\u503c\u4e0a\u4e0b\u6587\u8981\u6c42\u3002\u5f53\u64cd\u4f5c\u6570\u7c7b\u578b\u4e0d\u4e00\u81f4\u65f6&#xff0c;PHP\u4f1a\u89e6\u53d1\u9690\u5f0f\u7c7b\u578b\u8f6c\u6362&#xff0c;\u5176\u5e95\u5c42\u9075\u5faa\u5b57\u7b26\u4e32\u5411\u6570\u503c\u8f6c\u6362\u7684\u65e2\u5b9a\u89c4\u5219\u3002\u52a0\u6cd5\u8fd0\u7b97\u8feb\u4f7f\u5b57\u7b26\u4e32\u53ea\u8ba4\u5f00\u5934\u7684\u6570\u5b57\u90e8\u5206&#xff0c;\u5176\u4f59\u540e\u7f00\u88ab\u4e22\u5f03&#xff0c;\u7136\u540e\u4e24\u4e2a\u7eaf\u6570\u5b57\u5b8c\u6210\u6c42\u548c\u3002\u8fd9\u662f\u52a8\u6001\u7c7b\u578b\u8bed\u8a00\u4e2d\u5e38\u89c1\u7684\u201c\u5f31\u7c7b\u578b\u201d\u7279\u6027\u3002<\/p>\n<h2 style=\"margin-left:0.0001pt;text-align:justify\">\u4e09\u3001\u53ef\u53d8\u53d8\u91cf<\/h2>\n<p>&lt;?php<\/p>\n<p>$user &#061; &#034;hack123&#034;;<\/p>\n<p>$admin &#061; &#034;\u5bc6\u7801123456&#034;;<\/p>\n<p>echo $$user;<\/p>\n<p>?&gt;<\/p>\n<p style=\"text-align:center\"><img decoding=\"async\" alt=\"\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/08\/20260804114929-6a71d1c9dbc87.png\" \/><\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">\u5148\u8ba1\u7b97\u5185\u5c42\u53d8\u91cf $user&#xff0c;\u5f97\u5230\u5b57\u7b26\u4e32\u503c &#034;hack123&#034;\u3002\u5c06 &#034;hack123&#034; \u4f5c\u4e3a\u65b0\u7684\u53d8\u91cf\u540d&#xff0c;\u53bb\u67e5\u627e\u540d\u4e3a $hack123 \u7684\u53d8\u91cf\u3002\u56e0\u4e3a\u4ece\u672a\u7ed9 $hack123 \u8d4b\u503c&#xff0c;\u67e5\u627e\u5931\u8d25&#xff0c;\u6240\u4ee5\u4f1a\u62a5\u9519\u3002<\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">\u53ef\u4ee5\u7528\u6570\u5b66\u65b9\u9762\u8fd9\u6837\u7406\u89e3&#xff1a;\u2235$user&#061;hack123 \u2234$$user&#061;$($user)&#061;$hack123\u3002\u4f46\u56e0\u4e3a\u6ca1\u6709\u5b9a\u4e49$hack123\u7684\u503c&#xff0c;\u6240\u4ee5\u5b83\u8ba4\u4e0d\u51fa\u8c01\u662f$hack123&#xff0c;\u7136\u540e\u5bfc\u81f4\u62a5\u9519\u3002<\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">\n<p>&lt;?php<\/p>\n<p>$name &#061; &#034;flag&#034;;<\/p>\n<p>$flag &#061; &#034;this_is_secret_flag&#034;;<\/p>\n<p>$$name &#061; &#034;hacker_get_flag&#034;;<\/p>\n<p>echo $flag;<\/p>\n<p>?&gt;<\/p>\n<p style=\"text-align:center\"><img decoding=\"async\" alt=\"\" class=\"left\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/08\/20260804114929-6a71d1c9ee29c.png\" \/><\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">\u8fd9\u662f\u4e00\u4e2a\u5199\u5165\u64cd\u4f5c&#xff0c;\u76f4\u63a5\u4fee\u6539\u4e86\u540d\u4e3a flag \u7684\u53d8\u91cf\u3002<\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">\u56e0\u4e3a\u6709$name&#061;flag \u6240\u4ee5$$name&#061;$flag&#xff0c;\u4f46\u6700\u540e\u5199\u5165\u7684\u662f$$name&#061;\u201dhacker_get_flag\u201d;<\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">\u6240\u4ee5$flag&#061;hacker_get_flag<\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">\n<p style=\"margin-left:.0001pt;text-align:justify\">\u53ef\u53d8\u53d8\u91cf\u4e3a\u4ec0\u4e48\u4f1a\u4ea7\u751f\u53d8\u91cf\u8986\u76d6\u6f0f\u6d1e&#xff1f;<\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">\u5982\u679c\u7a0b\u5e8f\u4ece\u7528\u6237\u8f93\u5165&#xff08;\u5982 $_GET, $_POST, $_COOKIE&#xff09;\u4e2d\u83b7\u53d6\u6570\u636e&#xff0c;\u5e76\u76f4\u63a5\u6216\u95f4\u63a5\u5730\u7528\u4e8e\u521b\u5efa\u53ef\u53d8\u53d8\u91cf&#xff0c;\u653b\u51fb\u8005\u5c31\u53ef\u4ee5\u901a\u8fc7\u63a7\u5236\u8f93\u5165\u6765\u8986\u76d6\u7a0b\u5e8f\u4e2d\u7684\u4efb\u610f\u53d8\u91cf\u3002\u7b80\u5355\u7684\u6765\u8bf4\u5f53\u7528\u6237\u53ef\u63a7\u7684\u6570\u636e\u88ab\u4e0d\u5f53\u5730\u7528\u4f5c\u53ef\u53d8\u53d8\u91cf\u7684\u540d\u79f0\u65f6&#xff0c;\u653b\u51fb\u8005\u53ef\u4ee5\u8986\u76d6\u4efb\u4f55\u5df2\u5b58\u5728\u7684\u53d8\u91cf&#xff0c;\u4ece\u800c\u7834\u574f\u7a0b\u5e8f\u7684\u903b\u8f91\u6216\u6570\u636e\u3002<\/p>\n<h2 style=\"margin-left:0.0001pt;text-align:justify\">\u56db\u3001\u5e03\u5c14\u8f6c\u6362\u9ed1\u540d\u5355\u503c<\/h2>\n<p>&lt;?php<\/p>\n<p>$arr &#061; [false, 0, 0.0, &#034;&#034;, &#034;0&#034;, [], NULL, &#034;abc&#034;, 99, 3.14];<\/p>\n<p>foreach($arr as $v){<\/p>\n<p>\u00a0\u00a0\u00a0\u00a0if($v){<\/p>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0echo var_dump($v).&#034; \u2192 \u771f&lt;br&gt;&#034;;<\/p>\n<p>\u00a0\u00a0\u00a0\u00a0}else{<\/p>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0echo var_dump($v).&#034; \u2192 \u5047&lt;br&gt;&#034;;<\/p>\n<p>\u00a0\u00a0\u00a0\u00a0}<\/p>\n<p>}<\/p>\n<p>?&gt;<\/p>\n<p style=\"text-align:center\"><img decoding=\"async\" alt=\"\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/08\/20260804114930-6a71d1ca0a571.png\" \/><\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">10\u79cd\u4e0d\u540c\u6570\u636e\u7c7b\u578b\u7684\u6570\u7ec4&#xff0c;\u7136\u540e\u7528 foreach \u904d\u5386\u6bcf\u4e2a\u5143\u7d20&#xff0c;\u5728 if \u5224\u65ad\u4e2d\u9a8c\u8bc1\u5b83\u4eec\u81ea\u52a8\u8f6c\u6362\u540e\u7684\u5e03\u5c14\u503c\u662f\u771f\u8fd8\u662f\u5047&#xff0c;\u5e76\u901a\u8fc7 var_dump() \u8f93\u51fa\u6bcf\u4e2a\u503c\u7684\u539f\u59cb\u7c7b\u578b\u548c\u5185\u5bb9&#xff0c;\u4ee5\u6b64\u76f4\u89c2\u5c55\u793a PHP \u7684\u5047\u503c\u5217\u8868\u548c\u7c7b\u578b\u81ea\u52a8\u8f6c\u6362\u89c4\u5219\u3002<\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">\u5728\u5e03\u5c14\u4e0a\u4e0b\u6587\u4e2d&#xff0c;\u5e38\u89c1\u7684\u4ee5\u4e0b 7 \u79cd\u60c5\u51b5\u4f1a\u88ab\u8f6c\u6362\u4e3afalse&#xff1a;<\/p>\n<table border=\"1\" cellspacing=\"0\" style=\"margin-left:5.4000pt;width:398.9500pt\">\n<tbody>\n<tr>\n<td style=\"background-color:#ffffff;height:31.9500pt\">\n<p style=\"margin-left:.0001pt;text-align:center\"><span style=\"color:#000000\">\u7c7b\u578b<\/span><\/p>\n<\/td>\n<td style=\"background-color:#ffffff;height:31.9500pt\">\n<p style=\"margin-left:.0001pt;text-align:center\"><span style=\"color:#000000\">\u503c<\/span><\/p>\n<\/td>\n<td style=\"background-color:#ffffff;height:31.9500pt\">\n<p style=\"margin-left:.0001pt;text-align:center\"><span style=\"color:#000000\">\u793a\u4f8b<\/span><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"background-color:#ffffff;height:31.9500pt\">\n<p style=\"margin-left:.0001pt;text-align:center\"><span style=\"color:#000000\">\u5e03\u5c14<\/span><\/p>\n<\/td>\n<td style=\"background-color:#ffffff;height:31.9500pt\">\n<p style=\"margin-left:.0001pt;text-align:center\"><span style=\"color:#000000\">false \u672c\u8eab<\/span><\/p>\n<\/td>\n<td style=\"background-color:#ffffff;height:31.9500pt\">\n<p style=\"margin-left:.0001pt;text-align:center\"><span style=\"color:#000000\">if(false) \u2192 \u5047<\/span><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"background-color:#ffffff;height:31.9500pt\">\n<p style=\"margin-left:.0001pt;text-align:center\"><span style=\"color:#000000\">\u6574\u6570<\/span><\/p>\n<\/td>\n<td style=\"background-color:#ffffff;height:31.9500pt\">\n<p style=\"margin-left:.0001pt;text-align:center\"><span style=\"color:#000000\">0<\/span><\/p>\n<\/td>\n<td style=\"background-color:#ffffff;height:31.9500pt\">\n<p style=\"margin-left:.0001pt;text-align:center\"><span style=\"color:#000000\">if(0) \u2192 \u5047<\/span><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"background-color:#ffffff;height:31.9500pt\">\n<p style=\"margin-left:.0001pt;text-align:center\"><span style=\"color:#000000\">\u6d6e\u70b9\u6570<\/span><\/p>\n<\/td>\n<td style=\"background-color:#ffffff;height:31.9500pt\">\n<p style=\"margin-left:.0001pt;text-align:center\"><span style=\"color:#000000\">0.0 \u6216 -0.0<\/span><\/p>\n<\/td>\n<td style=\"background-color:#ffffff;height:31.9500pt\">\n<p style=\"margin-left:.0001pt;text-align:center\"><span style=\"color:#000000\">if(0.0) \u2192 \u5047<\/span><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"background-color:#ffffff;height:31.9500pt\">\n<p style=\"margin-left:.0001pt;text-align:center\"><span style=\"color:#000000\">\u5b57\u7b26\u4e32<\/span><\/p>\n<\/td>\n<td style=\"background-color:#ffffff;height:31.9500pt\">\n<p style=\"margin-left:.0001pt;text-align:center\"><span style=\"color:#000000\">&#034;&#034;&#xff08;\u7a7a\u5b57\u7b26\u4e32&#xff09;<\/span><\/p>\n<\/td>\n<td style=\"background-color:#ffffff;height:31.9500pt\">\n<p style=\"margin-left:.0001pt;text-align:center\"><span style=\"color:#000000\">if(&#034;&#034;) \u2192 \u5047<\/span><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"background-color:#ffffff;height:31.9500pt\">\n<p style=\"margin-left:.0001pt;text-align:center\"><span style=\"color:#000000\">\u5b57\u7b26\u4e32<\/span><\/p>\n<\/td>\n<td style=\"background-color:#ffffff;height:31.9500pt\">\n<p style=\"margin-left:.0001pt;text-align:center\"><span style=\"color:#000000\">&#034;0&#034;&#xff08;\u5b57\u7b260&#xff09;<\/span><\/p>\n<\/td>\n<td style=\"background-color:#ffffff;height:31.9500pt\">\n<p style=\"margin-left:.0001pt;text-align:center\"><span style=\"color:#000000\">if(&#034;0&#034;) \u2192 \u5047<\/span><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"background-color:#ffffff;height:31.9500pt\">\n<p style=\"margin-left:.0001pt;text-align:center\"><span style=\"color:#000000\">\u6570\u7ec4<\/span><\/p>\n<\/td>\n<td style=\"background-color:#ffffff;height:31.9500pt\">\n<p style=\"margin-left:.0001pt;text-align:center\"><span style=\"color:#000000\">[]&#xff08;\u7a7a\u6570\u7ec4&#xff09;<\/span><\/p>\n<\/td>\n<td style=\"background-color:#ffffff;height:31.9500pt\">\n<p style=\"margin-left:.0001pt;text-align:center\"><span style=\"color:#000000\">if([]) \u2192 \u5047<\/span><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"background-color:#ffffff;height:32.9500pt\">\n<p style=\"margin-left:.0001pt;text-align:center\"><span style=\"color:#000000\">NULL<\/span><\/p>\n<\/td>\n<td style=\"background-color:#ffffff;height:32.9500pt\">\n<p style=\"margin-left:.0001pt;text-align:center\"><span style=\"color:#000000\">NULL<\/span><\/p>\n<\/td>\n<td style=\"background-color:#ffffff;height:32.9500pt\">\n<p style=\"margin-left:.0001pt;text-align:center\"><span style=\"color:#000000\">if(NULL) \u2192 \u5047<\/span><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p style=\"margin-left:.0001pt;text-align:justify\">\u9664\u6b64\u4ee5\u5916\u7684\u6240\u6709\u503c&#xff0c;\u90fd\u662f true&#xff08;\u771f\u503c&#xff09;\u3002<\/p>\n<h2 style=\"margin-left:0.0001pt;text-align:justify\">\u4e94\u3001\u5355\u5f15\u53f7\/\u53cc\u5f15\u53f7\/\u5b9a\u754c\u7b26<\/h2>\n<p>&lt;?php<\/p>\n<p>$name &#061; &#034;xiu&#034;;<\/p>\n<p>$str1 &#061; &#039;hello $name ,\\\\&#039;test\\\\&#039;&#039;;<\/p>\n<p>echo $str1;<\/p>\n<p style=\"text-align:center\"><img decoding=\"async\" alt=\"\" class=\"left\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/08\/20260804114930-6a71d1ca20415.png\" \/><\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">\u5355\u5f15\u53f7\u5b57\u7b26\u4e32\u4e2d\u7684\u53d8\u91cf\u4e0d\u4f1a\u88ab\u89e3\u6790&#xff0c;\u7279\u6b8a\u5b57\u7b26\u53ea\u6709\u53cd\u659c\u6760 \\\\ \u7528\u4e8e\u8f6c\u4e49\u5355\u5f15\u53f7 \\\\&#039; \u548c\u53cd\u659c\u6760\u672c\u8eab \\\\\\\\\u3002<\/p>\n<p>&lt;?php<\/p>\n<p>$name &#061; &#034;xiu&#034;;<\/p>\n<p>$str2 &#061; &#034;hello {$name},\\\\&#034;test\\\\&#034;&#034;;<\/p>\n<p>echo $str2;<\/p>\n<p>?&gt;<\/p>\n<p style=\"text-align:center\"><img decoding=\"async\" alt=\"\" class=\"left\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/08\/20260804114930-6a71d1ca2fb2b.png\" \/><\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">\u53cc\u5f15\u53f7\u5b57\u7b26\u4e32\u4e2d\u7684\u53d8\u91cf\u4f1a\u88ab\u89e3\u6790\u3002{$name} \u662f\u4e00\u79cd\u660e\u786e\u544a\u8bc9PHP\u89e3\u6790\u5668\u8fd9\u662f\u4e00\u4e2a\u53d8\u91cf\u7684\u5199\u6cd5&#xff0c;\u5c24\u5176\u5728\u53d8\u91cf\u540d\u7d27\u6328\u7740\u5176\u4ed6\u5b57\u7b26\u65f6\u5f88\u6709\u7528\u3002<\/p>\n<p>&lt;?php<\/p>\n<p>$title &#061; &#034;php\u6e17\u900f\u7ec3\u4e60&#034;;<\/p>\n<p>$html &#061; &lt;&lt;&lt;HTML<\/p>\n<p>&lt;h1&gt;yemianbiaoti: {$title}&lt;\/h1&gt;<\/p>\n<p>&lt;script&gt;<\/p>\n<p>console.log(&#034;\u5b9a\u754c\u7b26\u65e0\u9700\u8f6c\u4e49\u5355\u53cc\u5f15\u53f7&#xff01;&#034;);<\/p>\n<p>&lt;\/script&gt;<\/p>\n<p>HTML;<\/p>\n<p>echo $html;<\/p>\n<p>?&gt;<\/p>\n<p style=\"text-align:center\"><img decoding=\"async\" alt=\"\" class=\"left\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/08\/20260804114930-6a71d1ca4091d.png\" \/><\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">\u8f93\u51fa\u4e00\u6bb5HTML&#xff0c;\u5176\u4e2d &lt;h1&gt; \u6807\u7b7e\u5185\u663e\u793a\u4e86 &#034;PHP\u6e17\u900f\u7ec3\u4e60&#034;\u3002&lt;&lt;&lt;HTML \u8868\u793a\u5f00\u59cb\u4e00\u4e2a\u540d\u4e3a &#034;HTML&#034; \u7684\u591a\u884c\u5b57\u7b26\u4e32&#xff0c;HTML; \u8868\u793a\u7ed3\u675f\u3002\u8fd9\u79cd\u8bed\u6cd5\u8ba9\u4f60\u80fd\u65b9\u4fbf\u5730\u8f93\u51fa\u5927\u6bb5 HTML\/JavaScript \u4ee3\u7801&#xff0c;\u4e14\u65e0\u9700\u8f6c\u4e49\u5f15\u53f7&#xff0c;{$title} \u4f1a\u88ab\u66ff\u6362\u4e3a\u53d8\u91cf\u7684\u503c\u3002<\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">1. \u8f93\u51fa\u53d8\u91cf\u65f6&#096;{$name}&#096;\u5927\u62ec\u53f7\u4f5c\u7528\u662f\u4ec0\u4e48&#xff1f;\u4e0d\u52a0\u4f1a\u51fa\u73b0\u4ec0\u4e48\u95ee\u9898&#xff1f;<\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">\u4f5c\u7528&#xff1a;\u660e\u786e\u754c\u5b9a\u53d8\u91cf\u540d\u7684\u8fb9\u754c\u3002<\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">\u95ee\u9898&#xff1a;\u5982\u679c\u4e0d\u52a0\u5927\u62ec\u53f7&#xff0c;PHP\u4f1a\u5c3d\u53ef\u80fd\u591a\u5730\u541e\u5e76\u5b57\u7b26\u4f5c\u4e3a\u53d8\u91cf\u540d\u3002\u4f8b\u5982 &#034;hello $name123&#034;&#xff0c;PHP\u4f1a\u8ba4\u4e3a\u53d8\u91cf\u662f $name123 \u800c\u4e0d\u662f $name&#xff0c;\u5bfc\u81f4\u627e\u4e0d\u5230\u53d8\u91cf\u800c\u62a5\u9519\u3002\u5927\u62ec\u53f7\u53ef\u4ee5\u907f\u514d\u8fd9\u79cd\u6b67\u4e49\u3002<\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">2. \u5927\u6bb5\u6df7\u5408HTML\u3001JS\u4ee3\u7801\u65f6&#xff0c;\u4f18\u5148\u7528\u54ea\u79cd\u5b57\u7b26\u4e32\u683c\u5f0f&#xff1f;<\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\"><span style=\"background-color:#ffd900\">\u9996\u9009$\u53d8\u91cf &#061; &lt;&lt;&lt;\u6807\u8bb0\u540d <\/span><\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\"><span style=\"background-color:#ffd900\">\u6587\u672c\u5185\u5bb9&#xff08;\u53ef\u4ee5\u5305\u542b\u53d8\u91cf {$\u53d8\u91cf\u540d}&#xff09;<\/span><\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\"><span style=\"background-color:#ffd900\">\u6807\u8bb0\u540d;<\/span><\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">\u6216<\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\"><span style=\"background-color:#ffd900\">$\u53d8\u91cf &#061; &lt;&lt;&lt;&#039;\u6807\u8bb0\u540d&#039; \u6ce8\u610f&#xff1a;\u6807\u8bb0\u540d\u7528\u5355\u5f15\u53f7\u5305\u88f9<\/span><\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\"><span style=\"background-color:#ffd900\">\u6587\u672c\u5185\u5bb9&#xff08;\u53d8\u91cf\u4e0d\u4f1a\u88ab\u89e3\u6790&#xff09;<\/span><\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\"><span style=\"background-color:#ffd900\">\u6807\u8bb0\u540d;<\/span><\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">&lt;&lt;&lt;HTML\u7684\u884c\u4e3a\u7c7b\u4f3c\u4e8e\u53cc\u5f15\u53f7&#xff0c;\u53ef\u4ee5\u89e3\u6790\u53d8\u91cf&#xff0c;\u5e76\u4e14\u5185\u90e8\u7684\u53cc\u5f15\u53f7\u3001\u5355\u5f15\u53f7\u90fd\u65e0\u9700\u8f6c\u4e49&#xff0c;\u975e\u5e38\u9002\u5408\u8f93\u51fa\u5927\u6bb5\u7684\u3001\u5305\u542b\u5927\u91cf\u5f15\u53f7\u548c\u6362\u884c\u7b26\u7684HTML\/JS\u4ee3\u7801&#xff0c;\u53ef\u8bfb\u6027\u6700\u597d\u3002<\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">\u5355\u5f15\u53f7&#xff1a;\u6027\u80fd\u6700\u597d&#xff0c;\u4e0d\u89e3\u6790\u53d8\u91cf&#xff0c;\u53ea\u8f6c\u4e49 \\\\&#039; \u548c \\\\\\\\\u3002<\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">\u53cc\u5f15\u53f7&#xff1a;\u6027\u80fd\u6b21\u4e4b&#xff0c;\u89e3\u6790\u53d8\u91cf&#xff0c;\u8f6c\u4e49\u591a\u79cd\u7279\u6b8a\u5b57\u7b26&#xff08;\u5982 \\\\n, \\\\t, \\\\&#034; \u7b49&#xff09;\u3002<\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">\u5b9a\u754c\u7b26&#xff1a;\u9002\u5408\u591a\u884c\u6587\u672c&#xff0c;\u884c\u4e3a\u7c7b\u4f3c\u53cc\u5f15\u53f7\u6216\u5355\u5f15\u53f7\u3002<\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">\u5927\u62ec\u53f7\u8bed\u6cd5&#xff1a; \u660e\u786e\u53d8\u91cf\u8fb9\u754c&#xff0c;\u63d0\u9ad8\u4ee3\u7801\u53ef\u8bfb\u6027\u548c\u5065\u58ee\u6027\u3002<\/p>\n<h2 style=\"margin-left:0.0001pt;text-align:justify\">\u516d\u3001\u9b54\u672f\u5e38\u91cf<\/h2>\n<p>&lt;?php<\/p>\n<p>echo &#034;\u5f53\u524d\u6587\u4ef6\u5b8c\u6574\u8def\u5f84&#xff1a;&#034;.__FILE__.&#034;&lt;br&gt;&#034;;<\/p>\n<p>echo &#034;\u5f53\u524d\u4ee3\u7801\u884c\u53f7&#xff1a;&#034;.__LINE__.&#034;&lt;br&gt;&#034;;<\/p>\n<p>echo &#034;PHP\u7248\u672c&#xff1a;&#034;.PHP_VERSION.&#034;&lt;br&gt;&#034;;<\/p>\n<p>echo &#034;\u64cd\u4f5c\u7cfb\u7edf&#xff1a;&#034;.PHP_OS.&#034;&lt;br&gt;&#034;;<\/p>\n<p>echo &#034;\u76ee\u5f55\u5206\u9694\u7b26&#xff1a;&#034;.DIRECTORY_SEPARATOR;<\/p>\n<p>?&gt;<\/p>\n<p style=\"text-align:center\"><img decoding=\"async\" alt=\"\" class=\"left\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/08\/20260804114930-6a71d1ca52706.png\" \/><\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">\n<p style=\"margin-left:.0001pt;text-align:justify\">\u98ce\u9669&#xff1a;\u66b4\u9732\u7f51\u7ad9\u6839\u76ee\u5f55&#xff0c;\u653b\u51fb\u8005\u53ef\u4ee5\u5f97\u77e5\u7f51\u7ad9\u6587\u4ef6\u5728\u670d\u52a1\u5668\u4e0a\u7684\u7edd\u5bf9\u8def\u5f84&#xff08;\u5982 \/var\/www\/html\/project\/app\/controller\/index.php&#xff09;\u3002<\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">\u7f51\u7ad9\u5bf9\u5916\u66b4\u9732 __FILE__ \u8def\u5f84\u4f1a\u9020\u6210\u5de8\u5927\u7684\u5b89\u5168\u98ce\u9669\u3002\u8fd9\u5c5e\u4e8e\u4fe1\u606f\u6cc4\u9732\u6f0f\u6d1e\u3002<\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">\u8f85\u52a9\u5176\u4ed6\u653b\u51fb&#xff1a;\u8fd9\u4e2a\u8def\u5f84\u4fe1\u606f\u53ef\u4ee5\u4e0e\u5176\u4ed6\u6f0f\u6d1e&#xff08;\u5982SQL\u6ce8\u5165\u3001\u6587\u4ef6\u5305\u542b\u3001\u672c\u5730\u6587\u4ef6\u5305\u542b LFI&#xff09;\u7ed3\u5408\u4f7f\u7528&#xff0c;\u5e2e\u52a9\u653b\u51fb\u8005\u66f4\u7cbe\u786e\u5730\u5b9a\u4f4d\u548c\u8bfb\u53d6\u654f\u611f\u6587\u4ef6&#xff08;\u5982\u914d\u7f6e\u6587\u4ef6config.php&#xff0c;\u5305\u542b\u6570\u636e\u5e93\u5bc6\u7801\u7b49&#xff09;\u3002<\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">\u793e\u4f1a\u5de5\u7a0b\u5b66&#xff1a;\u66b4\u9732\u4e86\u5f00\u53d1\u6846\u67b6\u3001\u76ee\u5f55\u7ed3\u6784&#xff0c;\u4e3a\u540e\u7eed\u66f4\u6df1\u5165\u7684\u653b\u51fb\u63d0\u4f9b\u4e86\u4fe1\u606f\u57fa\u7840\u3002<\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">\u9b54\u672f\u5e38\u91cf&#xff1a;__FILE__, __LINE__, __DIR__ \u7b49&#xff0c;\u5b83\u4eec\u4f1a\u968f\u7740\u4ee3\u7801\u4f4d\u7f6e\u7684\u53d8\u5316\u800c\u53d8\u5316&#xff0c;\u63d0\u4f9b\u4e0a\u4e0b\u6587\u4fe1\u606f\u3002<\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">\u9884\u5b9a\u4e49\u5e38\u91cf&#xff1a;PHP_VERSION, PHP_OS, DIRECTORY_SEPARATOR \u7b49&#xff0c;\u63d0\u4f9b\u4e86PHP\u73af\u5883\u548c\u64cd\u4f5c\u7cfb\u7edf\u7684\u4fe1\u606f\u3002<\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">\u5b89\u5168\u98ce\u9669&#xff1a;\u6c38\u8fdc\u4e0d\u8981\u5728\u7ebf\u4e0a\u73af\u5883\u76f4\u63a5\u8f93\u51fa\u8fd9\u4e9b\u654f\u611f\u4fe1\u606f\u3002phpinfo() \u51fd\u6570\u66f4\u662f\u4fe1\u606f\u6cc4\u9732\u7684&#034;\u91cd\u707e\u533a&#034;&#xff0c;\u751f\u4ea7\u73af\u5883\u52a1\u5fc5\u7981\u7528\u3002<\/p>\n<h2 style=\"margin-left:0.0001pt;text-align:justify\">\u4e03\u3001&#061;&#061; \u4e0e &#061;&#061;&#061;<\/h2>\n<p>&lt;?php<\/p>\n<p>var_dump(&#034;123abc&#034; &#061;&#061; 123);<\/p>\n<p>var_dump(&#034;123abc&#034; &#061;&#061;&#061; 123);<\/p>\n<p>var_dump(&#034;0&#034; &#061;&#061; false);<\/p>\n<p>var_dump(&#034;0&#034; &#061;&#061;&#061; false);<\/p>\n<p>var_dump([] &#061;&#061; false);<\/p>\n<p>var_dump(NULL &#061;&#061; &#034;&#034;);<\/p>\n<p>var_dump(NULL &#061;&#061;&#061; &#034;&#034;);<\/p>\n<p>?&gt;<\/p>\n<p style=\"text-align:center\"><img decoding=\"async\" alt=\"\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/08\/20260804114930-6a71d1ca642c7.png\" \/><\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">&#061;&#061;&#xff1a;\u677e\u6563\u6bd4\u8f83\u3002\u6bd4\u8f83\u524d\u4f1a\u8fdb\u884c\u7c7b\u578b\u8f6c\u6362\u3002<\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">&#034;123abc&#034; \u8f6c\u6570\u5b57\u662f 123&#xff0c;\u6240\u4ee5 123 &#061;&#061; 123 \u4e3a true\u3002<\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">&#034;0&#034; \u8f6c\u5e03\u5c14\u662f false&#xff0c;\u6240\u4ee5 false &#061;&#061; false \u4e3a true\u3002<\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">\u7a7a\u6570\u7ec4 [] \u8f6c\u5e03\u5c14\u662f false&#xff0c;\u6240\u4ee5 false &#061;&#061; false \u4e3a true\u3002<\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">NULL \u8f6c\u5b57\u7b26\u4e32\u662f\u7a7a\u5b57\u7b26\u4e32 &#034;&#034;&#xff0c;\u6240\u4ee5 &#034;&#034; &#061;&#061; &#034;&#034; \u4e3a true\u3002<\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">&#061;&#061;&#061;&#xff1a;\u4e25\u683c\u6bd4\u8f83\u3002\u8981\u6c42\u503c\u548c\u7c7b\u578b\u90fd\u5b8c\u5168\u76f8\u540c\u3002<\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">&#034;123abc&#034; \u662f\u5b57\u7b26\u4e32&#xff0c;123 \u662f\u6574\u6570&#xff0c;\u7c7b\u578b\u4e0d\u540c&#xff0c;\u4e3a false\u3002<\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">&#034;0&#034; \u662f\u5b57\u7b26\u4e32&#xff0c;false \u662f\u5e03\u5c14&#xff0c;\u7c7b\u578b\u4e0d\u540c&#xff0c;\u4e3a false\u3002<\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">NULL \u548c\u7a7a\u5b57\u7b26\u4e32\u7c7b\u578b\u4e0d\u540c&#xff0c;\u4e3a false\u3002<\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">\u4f8b\u5982&#xff1a;if ($_POST[&#039;password&#039;] &#061;&#061; $db_password)\u3002<\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">\u5982\u679c\u6570\u636e\u5e93\u4e2d\u7684\u5bc6\u7801\u662f\u7eaf\u6570\u5b57&#xff0c;\u6bd4\u5982 0\u3002<\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">\u653b\u51fb\u8005\u53ef\u4ee5\u63d0\u4ea4password&#061;0&#xff0c;\u4e24\u8005\u90fd\u4e3a\u6570\u5b570&#xff0c;\u901a\u8fc7\u9a8c\u8bc1\u3002<\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">\u66f4\u7ecf\u5178\u7684\u4f8b\u5b50\u662f&#xff0c;\u5982\u679c\u4f7f\u7528 &#061;&#061; \u6bd4\u8f83&#xff0c;\u653b\u51fb\u8005\u63d0\u4ea4\u4e00\u4e2a\u7a7a\u6570\u7ec4 []&#xff0c;\u5b83\u53ef\u80fd\u88ab\u8f6c\u6362\u4e3a NULL \u6216 0&#xff0c;\u4ece\u800c\u7ed5\u8fc7\u3002<\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">\n<p style=\"margin-left:.0001pt;text-align:justify\">&#061;&#061; \u4e0e &#061;&#061;&#061;&#xff1a; \u5728\u6d89\u53ca\u7528\u6237\u8f93\u5165\u6bd4\u8f83&#xff08;\u5c24\u5176\u662f\u5bc6\u7801\u3001\u6743\u9650\u5224\u65ad&#xff09;\u65f6&#xff0c;\u5fc5\u987b\u4f7f\u7528 &#061;&#061;&#061;&#xff0c;\u786e\u4fdd\u503c\u548c\u7c7b\u578b\u90fd\u5339\u914d&#xff0c;\u9632\u6b62\u56e0\u7c7b\u578b\u8f6c\u6362\u5bfc\u81f4\u7684\u5b89\u5168\u7ed5\u8fc7\u3002<\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">\u677e\u6563\u6bd4\u8f83\u89c4\u5219&#xff1a; \u8981\u719f\u6089\u5e38\u89c1\u7c7b\u578b\u5728 &#061;&#061; \u4e0b\u7684\u8f6c\u6362\u7ed3\u679c&#xff0c;\u7279\u522b\u662f\u5b57\u7b26\u4e32\u4e0e\u6570\u5b57\u3001\u5e03\u5c14\u503c\u3001NULL\u4e4b\u95f4\u7684\u6bd4\u8f83\u3002<\/p>\n<h2 style=\"margin-left:0.0001pt;text-align:justify\">\u516b\u3001\u53cd\u5f15\u53f7\u4e0e&#064;<\/h2>\n<p>&lt;?php<\/p>\n<p>$cmd &#061; &#034;ipconfig&#034;;<\/p>\n<p>echo &#034;&lt;pre&gt;&#034;.&#096;$cmd&#096;.&#034;&lt;\/pre&gt;&#034;;<\/p>\n<p>?&gt;<\/p>\n<p style=\"text-align:center\"><img decoding=\"async\" alt=\"\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/08\/20260804114930-6a71d1ca74ee4.png\" \/><\/p>\n<p>PHP \u4e2d\u7684\u53cd\u5f15\u53f7&#xff08;&#096;&#xff09;\u662f\u4e00\u4e2a\u6267\u884c\u8fd0\u7b97\u7b26&#xff0c;\u7528\u4e8e\u6267\u884c\u7cfb\u7edf\u547d\u4ee4\u5e76\u83b7\u53d6\u5176\u8f93\u51fa&#xff0c;\u5176\u529f\u80fd\u7b49\u540c\u4e8e shell_exec()\u3002<\/p>\n<p>&lt;?php<\/p>\n<p>echo $undefined_var;<\/p>\n<p>?&gt;<\/p>\n<p style=\"text-align:center\"><img decoding=\"async\" alt=\"\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/08\/20260804114930-6a71d1ca89e48.png\" \/><\/p>\n<p>&lt;?php<\/p>\n<p>echo &#064;$undefined_var;<\/p>\n<p>?&gt;<\/p>\n<p style=\"text-align:center\"><img decoding=\"async\" alt=\"\" class=\"left\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/08\/20260804114930-6a71d1ca9908a.png\" \/><\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">1. \u76f4\u63a5\u5c06\u7528\u6237\u8f93\u5165\u653e\u5165\u53cd\u5f15\u53f7&#096;&#096;\u4e2d\u4f1a\u4ea7\u751f\u4ec0\u4e48\u6f0f\u6d1e&#xff1f;<\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">\u4f1a\u4ea7\u751f\u547d\u4ee4\u6ce8\u5165\u6f0f\u6d1e\u3002\u5982\u679c\u7528\u6237\u8f93\u5165 ; rm -rf \/ \u6216 | whoami&#xff0c;PHP\u4f1a\u6267\u884c\u8fd9\u4e9b\u6076\u610f\u547d\u4ee4\u3002<\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">2. \u5f00\u53d1\u8005\u4f7f\u7528&#064;\u5c4f\u853d\u62a5\u9519\u4f1a\u7ed9\u6e17\u900f\u6d4b\u8bd5\u5e26\u6765\u4ec0\u4e48\u963b\u788d&#xff1f;<\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">\u9690\u85cf\u8c03\u8bd5\u4fe1\u606f&#xff1a;\u6e17\u900f\u6d4b\u8bd5\u4eba\u5458\u901a\u5e38\u4f9d\u8d56\u62a5\u9519\u4fe1\u606f\u6765\u4e86\u89e3\u6570\u636e\u5e93\u7ed3\u6784\u3001\u6587\u4ef6\u8def\u5f84\u3001\u53d8\u91cf\u540d\u79f0\u7b49\u3002&#064; \u5c4f\u853d\u4e86\u8fd9\u4e9b\u4fe1\u606f&#xff0c;\u589e\u52a0\u4e86\u4fe1\u606f\u6536\u96c6\u7684\u96be\u5ea6\u3002<\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">\u9690\u853d\u6f0f\u6d1e&#xff1a;\u5c4f\u853d\u9519\u8bef\u53ef\u80fd\u4f1a\u63a9\u76d6\u4e00\u4e9b\u660e\u663e\u7684\u9519\u8bef&#xff0c;\u5982SQL\u67e5\u8be2\u5931\u8d25\u3001\u6587\u4ef6\u5305\u542b\u5931\u8d25\u7b49&#xff0c;\u4f7f\u653b\u51fb\u8005\u96be\u4ee5\u5b9a\u4f4d\u6f0f\u6d1e\u70b9\u3002<\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">\u963b\u788d\u5224\u65ad&#xff1a;\u653b\u51fb\u8005\u65e0\u6cd5\u901a\u8fc7\u4fee\u6539\u53c2\u6570\u89e6\u53d1\u62a5\u9519\u6765\u5224\u65ad\u4ee3\u7801\u6267\u884c\u6d41\u7a0b&#xff0c;\u9700\u8981\u82b1\u8d39\u66f4\u591a\u65f6\u95f4\u548c\u7cbe\u529b\u8fdb\u884c&#034;\u9ed1\u76d2&#034;\u6d4b\u8bd5\u3002<\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">\n<p style=\"margin-left:.0001pt;text-align:justify\">\u53cd\u5f15\u53f7&#xff1a;\u662f shell_exec() \u51fd\u6570\u7684\u522b\u540d&#xff0c;\u7528\u4e8e\u6267\u884c\u7cfb\u7edf\u547d\u4ee4&#xff0c;\u662f\u547d\u4ee4\u6267\u884c\u6f0f\u6d1e\u7684\u76f4\u63a5\u8f7d\u4f53\u3002<\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">\u9519\u8bef\u6291\u5236\u7b26 &#064;&#xff1a;\u53ef\u4ee5\u5c4f\u853d\u8be5\u884c\u4ee3\u7801\u53ef\u80fd\u4ea7\u751f\u7684\u6240\u6709\u9519\u8bef\u3001\u8b66\u544a\u3001\u901a\u77e5\u3002\u5728\u751f\u4ea7\u73af\u5883\u4e2d\u8fc7\u5ea6\u4f7f\u7528\u4f1a\u4e25\u91cd\u963b\u788d\u8c03\u8bd5\u548c\u6f0f\u6d1e\u6392\u67e5\u3002<\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">\u5b89\u5168\u7f16\u7801&#xff1a;\u4e0d\u8981\u5c06\u7528\u6237\u8f93\u5165\u76f4\u63a5\u4f20\u9012\u7ed9\u53cd\u5f15\u53f7\u6216\u4efb\u4f55\u7cfb\u7edf\u6267\u884c\u51fd\u6570&#xff08;\u5982 system(), exec() \u7b49&#xff09;\u3002\u5fc5\u987b\u4f7f\u7528 escapeshellarg() \u6216 escapeshellcmd() \u8fdb\u884c\u4e25\u683c\u8fc7\u6ee4\u6216\u91c7\u7528\u767d\u540d\u5355\u65b9\u5f0f\u3002<\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">\n<h2 style=\"margin-left:0.0001pt;text-align:justify\">\u4e5d\u3001switch\u548cbreak<\/h2>\n<p>&lt;?php<\/p>\n<p>$week &#061; 7;<\/p>\n<p>switch($week){<\/p>\n<p>\u00a0\u00a0\u00a0\u00a0case 1: echo &#034;\u5468\u4e00&#034;; break;<\/p>\n<p>\u00a0\u00a0\u00a0\u00a0case 2: echo &#034;\u5468\u4e8c&#034;; break;<\/p>\n<p>\u00a0\u00a0\u00a0\u00a0case 7: echo &#034;\u5468\u65e5&#034;; break;<\/p>\n<p>\u00a0\u00a0\u00a0\u00a0default: echo &#034;\u975e\u6cd5\u661f\u671f&#034;;<\/p>\n<p>}<\/p>\n<p>?&gt;<\/p>\n<p style=\"text-align:center\"><img decoding=\"async\" alt=\"\" class=\"left\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/08\/20260804114930-6a71d1caa97b7.png\" \/><\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">$week\u662f1-7\u7684\u968f\u673a\u6570&#xff0c;\u7a0b\u5e8f\u4f1a\u6b63\u5e38\u8f93\u51fa\u5bf9\u5e94\u7684\u661f\u671f\u51e0&#xff0c;\u5982\u679c\u4e0d\u5728\u8303\u56f4\u5185\u5219\u8f93\u51fa&#034;\u975e\u6cd5\u661f\u671f&#034;\u3002<\/p>\n<p style=\"text-align:center\"><img decoding=\"async\" alt=\"\" class=\"left\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/08\/20260804114930-6a71d1caba0ff.png\" \/><\/p>\n<p>&lt;?php<\/p>\n<p>$week &#061; 7;<\/p>\n<p>switch($week){<\/p>\n<p>\u00a0\u00a0\u00a0\u00a0case 1: echo &#034;\u5468\u4e00&#034;; break;<\/p>\n<p>\u00a0\u00a0\u00a0\u00a0case 2: echo &#034;\u5468\u4e8c&#034;; break;<\/p>\n<p>\u00a0\u00a0\u00a0\u00a0case 7: echo &#034;\u5468\u65e5&#034;; break;<\/p>\n<p>\u00a0\u00a0\u00a0\u00a0default: echo &#034;\u975e\u6cd5\u661f\u671f&#034;;<\/p>\n<p>}<\/p>\n<p>?&gt;<\/p>\n<p style=\"text-align:center\"><img decoding=\"async\" alt=\"\" class=\"left\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/08\/20260804114930-6a71d1cacacbc.png\" \/><\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">\u7a0b\u5e8f\u4f1a\u6267\u884c case 1 \u7684\u4ee3\u7801\u5757&#xff08;\u8f93\u51fa&#034;\u5468\u4e00&#034;&#xff09;&#xff0c;\u7136\u540e\u7ee7\u7eed\u7a7f\u900f\u6267\u884ccase 2\u76f4\u5230\u9047\u5230 break\u6216switch\u7ed3\u675f\u3002<\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">1.switch\u7f3a\u5c11break\u4f1a\u4ea7\u751f\u4ec0\u4e48\u903b\u8f91\u6f0f\u6d1e&#xff1f;<\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">\u903b\u8f91\u9519\u8bef&#xff1a;\u7a0b\u5e8f\u53ef\u80fd\u6267\u884c\u591a\u4e2acase\u5206\u652f&#xff0c;\u5bfc\u81f4\u8f93\u51fa\u6216\u64cd\u4f5c\u4e0d\u7b26\u5408\u9884\u671f\u3002<\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">\u6743\u9650\u7ed5\u8fc7&#xff1a;\u5728\u6743\u9650\u5224\u65ad\u7684switch \u4e2d&#xff0c;\u5982\u679c\u5fd8\u8bb0\u5199break&#xff0c;\u53ef\u80fd\u5bfc\u81f4\u666e\u901a\u7528\u6237&#034;\u7a7f\u900f&#034;\u5230\u7ba1\u7406\u5458\u7684case\u3002<\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">\n<p style=\"margin-left:.0001pt;text-align:justify\">2.break\u7684\u4f5c\u7528&#xff1a;\u7ec8\u6b62switch\u8bed\u53e5\u7684\u6267\u884c&#xff0c;\u9632\u6b62&#034;\u7a7f\u900f&#034;\u5230\u4e0b\u4e00\u4e2acase\u3002<\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">3.\u7a7f\u900f&#xff08;Fall-through&#xff09;&#xff1a;\u5728\u67d0\u4e9b\u7279\u6b8a\u573a\u666f\u4e0b&#xff0c;\u53ef\u4ee5\u5229\u7528\u7a7f\u900f\u7279\u6027\u6765\u7b80\u5316\u4ee3\u7801&#xff08;\u6bd4\u5982\u591a\u4e2acase\u6267\u884c\u76f8\u540c\u7684\u64cd\u4f5c&#xff09;&#xff0c;\u4f46\u5728\u5927\u591a\u6570\u60c5\u51b5\u4e0b&#xff0c;\u5fd8\u8bb0\u52a0break\u662f\u903b\u8f91\u9519\u8bef\u7684\u6765\u6e90\u3002<\/p>\n<\/p>\n<h2 style=\"margin-left:0.0001pt;text-align:justify\">\u5341\u3001\u5faa\u73af<\/h2>\n<p>While\u5faa\u73af&#xff1a;<\/p>\n<p>&lt;?php<\/p>\n<p>$i &#061; 1;<\/p>\n<p>while ($i &lt;&#061; 100) {<\/p>\n<p>\u00a0\u00a0\u00a0\u00a0if ($i &#061;&#061; 80) {<\/p>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0break; \/\/ \u523080\u7ec8\u6b62\u5faa\u73af<\/p>\n<p>\u00a0\u00a0\u00a0\u00a0}<\/p>\n<p>\u00a0\u00a0\u00a0\u00a0if ($i % 17 &#061;&#061; 0) {<\/p>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0$i&#043;&#043;; \/\/ \u6ce8\u610f&#xff1a;\u8df3\u8fc7\u65f6\u4e5f\u8981\u9012\u589e&#xff0c;\u9632\u6b62\u6b7b\u5faa\u73af<\/p>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0continue; \/\/ \u8df3\u8fc717\u7684\u500d\u6570<\/p>\n<p>\u00a0\u00a0\u00a0\u00a0}<\/p>\n<p>\u00a0\u00a0\u00a0\u00a0echo $i . &#034; &#034;;<\/p>\n<p>\u00a0\u00a0\u00a0\u00a0$i&#043;&#043;;<\/p>\n<p>}<\/p>\n<p>?&gt;<\/p>\n<p style=\"text-align:center\"><img decoding=\"async\" alt=\"\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/08\/20260804114930-6a71d1cadaf3d.png\" \/><\/p>\n<p>for\u5faa\u73af&#xff1a;<\/p>\n<p>&lt;?php<\/p>\n<p>for ($i &#061; 1; $i &lt;&#061; 100; $i&#043;&#043;) {<\/p>\n<p>\u00a0\u00a0\u00a0\u00a0if ($i &#061;&#061; 80) {<\/p>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0break;<\/p>\n<p>\u00a0\u00a0\u00a0\u00a0}<\/p>\n<p>\u00a0\u00a0\u00a0\u00a0if ($i % 17 &#061;&#061; 0) {<\/p>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0continue;<\/p>\n<p>\u00a0\u00a0\u00a0\u00a0}<\/p>\n<p>\u00a0\u00a0\u00a0\u00a0echo $i . &#034; &#034;;<\/p>\n<p>}<\/p>\n<p>?&gt;<\/p>\n<p style=\"text-align:center\"><img decoding=\"async\" alt=\"\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/08\/20260804114931-6a71d1cb0b2b2.png\" \/><\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">continue&#xff1a; \u8df3\u8fc7\u5f53\u524d\u5faa\u73af\u7684\u5269\u4f59\u4ee3\u7801&#xff0c;\u8fdb\u5165\u4e0b\u4e00\u6b21\u5faa\u73af\u3002\u6ce8\u610f\u5728while\u5faa\u73af\u4e2d&#xff0c;\u5982\u679ccontinue \u524d\u5fd8\u8bb0\u9012\u589e $i&#xff0c;\u4f1a\u5bfc\u81f4\u6b7b\u5faa\u73af\u3002<\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">break&#xff1a;\u5b8c\u5168\u7ec8\u6b62\u5e76\u8df3\u51fa\u5f53\u524d\u7684\u5faa\u73af\u7ed3\u6784\u3002<\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">\u53d6\u6a21\u8fd0\u7b97\u7b26%&#xff1a;\u7528\u4e8e\u5224\u65ad\u662f\u5426\u80fd\u88ab17\u6574\u9664\u3002<\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">\u5faa\u73af\u63a7\u5236&#xff1a;break\u548ccontinue\u53ef\u4ee5\u7cbe\u7ec6\u63a7\u5236\u5faa\u73af\u7684\u6267\u884c\u6d41\u7a0b\u3002<\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">while\u4e0efor&#xff1a;while \u66f4\u7075\u6d3b&#xff0c;\u4f46\u9700\u8981\u624b\u52a8\u7ef4\u62a4\u5faa\u73af\u53d8\u91cf&#xff1b;for\u7ed3\u6784\u7d27\u51d1&#xff0c;\u9002\u5408\u77e5\u9053\u5faa\u73af\u6b21\u6570\u7684\u573a\u666f\u3002<\/p>\n<\/p>\n<h2 style=\"margin-left:0.0001pt;text-align:justify\">\u5341\u4e00\u3001\u7d22\u5f15\u6570\u7ec4\u3001\u5173\u8054\u6570\u7ec4\u521b\u5efa\u3001\u589e\u5220\u6539\u67e5<\/h2>\n<p>&lt;?php<\/p>\n<p>$class &#061; [&#034;a&#034;,&#034;b&#034;,&#034;c&#034;];<\/p>\n<p>$student &#061; [<\/p>\n<p>\u00a0\u00a0\u00a0\u00a0&#034;name&#034; &#061;&gt; &#034;cxy&#034;,<\/p>\n<p>&#034;age&#034; &#061;&gt; 26,<\/p>\n<p>&#034;score&#034; &#061;&gt; 90.9,<\/p>\n<p>&#034;sex&#034; &#061;&gt; true<\/p>\n<p>];<\/p>\n<p>$student[&#034;score&#034;] &#061; 98.0;<\/p>\n<p>$student[&#034;skill&#034;] &#061; &#034;Web\u6e17\u900f&#034;;<\/p>\n<p>echo &#034;\u53ea\u53d6\u503c&#xff1a;&#034;;<\/p>\n<p>foreach ($student as $value) {<\/p>\n<p>echo $value . &#034; &#034;;<\/p>\n<p>}<\/p>\n<p>echo &#034;&lt;br&gt;&#034;;<\/p>\n<p>echo &#034;\u540c\u65f6\u53d6\u952e\u548c\u503c&#xff1a;&#034;;<\/p>\n<p>foreach ($student as $key &#061;&gt; $value){<\/p>\n<p>echo &#034;[$key] &#061;&gt; $value&#034;;<\/p>\n<p>}<\/p>\n<p>echo &#034;&lt;br&gt;&#034;;<\/p>\n<p>?&gt;<\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">\n<p style=\"text-align:center\"><img decoding=\"async\" alt=\"\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/08\/20260804114931-6a71d1cb2c63e.png\" \/><\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">\u7d22\u5f15\u6570\u7ec4&#xff1a;\u952e\u662f\u81ea\u52a8\u9012\u589e\u7684\u6570\u5b57&#xff08;\u4ece0\u5f00\u59cb&#xff09;\u3002<\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">\u5173\u8054\u6570\u7ec4&#xff1a;\u952e\u662f\u81ea\u5b9a\u4e49\u7684\u5b57\u7b26\u4e32\u3002<\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">\u589e\/\u6539&#xff1a;\u76f4\u63a5\u4f7f\u7528 $array[key] &#061; value \u5373\u53ef&#xff0c;\u5982\u679c\u952e\u4e0d\u5b58\u5728\u5219\u65b0\u589e&#xff0c;\u5b58\u5728\u5219\u4fee\u6539\u3002<\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">\u5220&#xff1a;\u4f7f\u7528 unset($array[key])\u3002<\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">foreach&#xff1a;\u662f\u6700\u5e38\u7528\u7684\u904d\u5386\u6570\u7ec4\u65b9\u5f0f\u3002<\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">foreach ($array as $value) \u53ea\u83b7\u53d6\u503c\u3002<\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">foreach ($array as $key &#061;&gt; $value) \u540c\u65f6\u83b7\u53d6\u952e\u548c\u503c\u3002<\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">\u6570\u7ec4\u7c7b\u578b&#xff1a;PHP \u7684\u6570\u7ec4\u5b9e\u9645\u4e0a\u662f\u4e00\u4e2a\u6709\u5e8f\u6620\u5c04&#xff0c;\u53ef\u4ee5\u540c\u65f6\u5145\u5f53\u7d22\u5f15\u6570\u7ec4\u548c\u5173\u8054\u6570\u7ec4\u3002<\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">\u589e\u5220\u6539\u67e5&#xff1a;\u64cd\u4f5c\u975e\u5e38\u7b80\u5355\u76f4\u63a5&#xff0c;\u662fPHP\u7075\u6d3b\u6027\u7684\u4f53\u73b0\u3002<\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">\u904d\u5386&#xff1a;foreach \u662f\u5904\u7406\u6570\u7ec4\u7684\u9996\u9009\u65b9\u5f0f&#xff0c;\u5b83\u5185\u90e8\u7ef4\u62a4\u4e86\u6307\u9488&#xff0c;\u4e0d\u9700\u8981\u624b\u52a8\u63a7\u5236\u3002<\/p>\n<h2 style=\"margin-left:0.0001pt;text-align:justify\">\u5341\u4e8c\u3001\u603b\u7ed3<\/h2>\n<p style=\"margin-left:.0001pt;text-align:justify\">\n<p>PHP \u6807\u8bb0\u4e0e\u4fe1\u606f\u6cc4\u9732&#xff1a;PHP \u6807\u8bb0\u5916\u7684\u5185\u5bb9\u4f1a\u76f4\u63a5\u8f93\u51fa\u5230\u6d4f\u89c8\u5668&#xff0c;phpinfo() \u6216\u8f93\u51fa\u9b54\u672f\u5e38\u91cf&#xff08;__FILE__\u3001__DIR__ \u7b49&#xff09;\u4f1a\u66b4\u9732\u8def\u5f84\u548c\u914d\u7f6e\u4fe1\u606f&#xff0c;\u5c5e\u4e8e\u654f\u611f\u4fe1\u606f\u6cc4\u9732\u6f0f\u6d1e&#xff0c;\u751f\u4ea7\u73af\u5883\u52a1\u5fc5\u5173\u95ed\u9519\u8bef\u663e\u793a\u5e76\u7981\u7528 phpinfo\u3002<\/p>\n<p>\u5f31\u7c7b\u578b\u4e0e\u7c7b\u578b\u8f6c\u6362&#xff1a;\u5b57&#043;\u5b57\u7b26\u4e32\u8fd0\u7b97\u3001\u677e\u6563\u6bd4\u8f83&#xff08;&#061;&#061;&#xff09;\u7b49\u573a\u666f\u4e0b\u7684\u9690\u5f0f\u7c7b\u578b\u8f6c\u6362&#xff0c;\u53ef\u80fd\u5bfc\u81f4\u903b\u8f91\u5224\u65ad\u9519\u8bef\u6216\u7ed5\u8fc7\u8eab\u4efd\u9a8c\u8bc1\u3002\u59cb\u7ec8\u4f7f\u7528\u4e25\u683c\u6bd4\u8f83&#xff08;&#061;&#061;&#061;&#xff09;&#xff0c;\u5e76\u907f\u514d\u5728\u5b89\u5168\u654f\u611f\u5904\u4f9d\u8d56\u9690\u5f0f\u8f6c\u6362\u3002<\/p>\n<p>\u53ef\u53d8\u53d8\u91cf\u4e0e\u53d8\u91cf\u8986\u76d6&#xff1a;\u53ef\u53d8\u53d8\u91cf&#xff08;$$&#xff09;\u82e5\u7ed3\u5408\u7528\u6237\u8f93\u5165&#xff0c;\u53ef\u76f4\u63a5\u9020\u6210\u53d8\u91cf\u8986\u76d6\u6f0f\u6d1e&#xff0c;\u653b\u51fb\u8005\u53ef\u7be1\u6539\u7a0b\u5e8f\u72b6\u6001\u3002\u4e25\u7981\u5c06\u7528\u6237\u53ef\u63a7\u6570\u636e\u7528\u4e8e\u52a8\u6001\u53d8\u91cf\u540d\u3002<\/p>\n<p>\u5e03\u5c14\u771f\u5047\u503c&#xff1a;\u7406\u89e3 PHP \u7684\u5047\u503c\u5217\u8868&#xff08;false, 0, 0.0, &#034;&#034;, &#034;0&#034;, [], NULL&#xff09;&#xff0c;\u907f\u514d\u5728\u6761\u4ef6\u5224\u65ad\u4e2d\u56e0\u7c7b\u578b\u8f6c\u6362\u4ea7\u751f\u610f\u5916\u7ed3\u679c\u3002\u5c24\u5176\u6ce8\u610f &#034;0&#034; \u4e3a\u5047\u503c&#xff0c;\u4f46 &#034;0.0&#034; \u4e3a\u771f\u503c\u3002<\/p>\n<p>\u5b57\u7b26\u4e32\u5b9a\u754c\u4e0e\u6ce8\u5165&#xff1a;\u5b9a\u754c\u7b26&#xff08;&lt;&lt;&lt;&#xff09;\u9002\u5408\u8f93\u51fa\u5927\u6bb5 HTML&#xff0c;\u4f46\u9700\u6ce8\u610f\u53d8\u91cf\u6ce8\u5165\u7684\u98ce\u9669\u3002\u8f93\u51fa\u5230\u9875\u9762\u65f6\u5e94\u5bf9\u53d8\u91cf\u8fdb\u884c htmlspecialchars() \u8f6c\u4e49&#xff0c;\u9632\u6b62 XSS\u3002<\/p>\n<p>\u9b54\u672f\u5e38\u91cf\u4e0e\u9884\u5b9a\u4e49\u5e38\u91cf&#xff1a;__FILE__\u3001PHP_VERSION \u7b49\u53ef\u6cc4\u9732\u670d\u52a1\u5668\u8def\u5f84\u3001PHP \u7248\u672c\u7b49\u4fe1\u606f&#xff0c;\u751f\u4ea7\u73af\u5883\u7981\u6b62\u76f4\u63a5\u8f93\u51fa\u3002\u53ef\u901a\u8fc7\u914d\u7f6e php.ini \u7981\u7528\u76f8\u5173\u8f93\u51fa\u3002<\/p>\n<p>\u53cd\u5f15\u53f7\u547d\u4ee4\u6ce8\u5165&#xff1a;\u53cd\u5f15\u53f7\u7b49\u540c\u4e8e shell_exec()&#xff0c;\u76f4\u63a5\u6267\u884c\u7cfb\u7edf\u547d\u4ee4&#xff0c;\u82e5\u62fc\u63a5\u7528\u6237\u8f93\u5165\u5c06\u5bfc\u81f4\u547d\u4ee4\u6ce8\u5165&#xff0c;\u662f\u6700\u5371\u9669\u7684\u5b89\u5168\u6f0f\u6d1e\u4e4b\u4e00\u3002\u675c\u7edd\u4f7f\u7528\u53cd\u5f15\u53f7\u6267\u884c\u5916\u90e8\u8f93\u5165&#xff0c;\u9700\u8981\u6267\u884c\u7cfb\u7edf\u547d\u4ee4\u65f6\u5e94\u4f7f\u7528 escapeshellcmd() \u6216\u767d\u540d\u5355\u3002<\/p>\n<p>\u9519\u8bef\u6291\u5236\u7b26 &#064;&#xff1a;&#064; \u4f1a\u5c4f\u853d\u9519\u8bef\u4fe1\u606f&#xff0c;\u867d\u7136\u53ef\u4ee5\u9690\u85cf\u8c03\u8bd5\u4fe1\u606f&#xff0c;\u4f46\u4e5f\u4f1a\u63a9\u76d6\u771f\u5b9e\u6f0f\u6d1e&#xff0c;\u5efa\u8bae\u4ec5\u7528\u4e8e\u9884\u671f\u53ef\u63a7\u7684\u9519\u8bef\u573a\u666f&#xff0c;\u751f\u4ea7\u73af\u5883\u5e94\u914d\u5408\u65e5\u5fd7\u8bb0\u5f55\u3002<\/p>\n<p>switch \u7a7f\u900f\u4e0e\u903b\u8f91\u9519\u8bef&#xff1a;\u5fd8\u8bb0 break \u4f1a\u5bfc\u81f4 case \u7a7f\u900f&#xff0c;\u53ef\u80fd\u9020\u6210\u6743\u9650\u7ed5\u8fc7\u6216\u903b\u8f91\u6f0f\u6d1e&#xff0c;\u6bcf\u4e2a case \u672b\u5c3e\u52a1\u5fc5\u6dfb\u52a0 break&#xff0c;\u9664\u975e\u6709\u610f\u5229\u7528\u7a7f\u900f\u7279\u6027\u3002<\/p>\n<p>\u5faa\u73af\u63a7\u5236\u4e0e\u6b7b\u5faa\u73af&#xff1a;while \u5faa\u73af\u4e2d continue \u524d\u5fc5\u987b\u9012\u589e\u8ba1\u6570\u5668&#xff0c;\u5426\u5219\u5bfc\u81f4\u6b7b\u5faa\u73af&#xff1b;break \u8981\u53ca\u65f6\u9000\u51fa\u5faa\u73af&#xff0c;\u9632\u6b62\u65e0\u9650\u6267\u884c\u3002<\/p>\n<p>\u6570\u7ec4\u4e0e\u6570\u636e\u64cd\u4f5c&#xff1a;PHP \u6570\u7ec4\u7075\u6d3b\u5f3a\u5927&#xff0c;\u662f Web \u5f00\u53d1\u5e38\u7528\u6570\u636e\u7ed3\u6784&#xff0c;\u4f46\u8981\u6ce8\u610f\u5728\u5bf9\u6570\u7ec4\u8fdb\u884c\u589e\u5220\u6539\u67e5\u65f6&#xff0c;\u907f\u514d\u56e0\u672a\u9a8c\u8bc1\u6570\u636e\u6765\u6e90\u5bfc\u81f4\u7684\u903b\u8f91\u6f0f\u6d1e&#xff08;\u5982\u672a\u8fc7\u6ee4\u7684\u952e\u540d\u53ef\u88ab\u5229\u7528&#xff09;\u3002<\/p>\n<p style=\"margin-left:.0001pt;text-align:justify\">\n","protected":false},"excerpt":{"rendered":"<p>\u4e00\u3001PHP\u6807\u51c6\u8bed\u8a00\u683c\u5f0fPHP\u8bed\u8a00\u6807\u8bb0&#xff1a;PHP\u7528\u901a\u4fd7\u7684\u8bdd\u6765\u8bb2\u5b83\u662f\u6bd4\u8f83\u968f\u610f\u7684\u4e00\u4e2a\u8bed\u8a00&#xff0c;\u5728PHP\u6587\u4ef6\u4e2d&#xff0c;\u91cc\u9762\u53ef\u4ee5<\/p>\n","protected":false},"author":2,"featured_media":90170,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[230,275,61,190],"topic":[],"class_list":["post-90189","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-php","tag-web","tag-61","tag-190"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u521d\u8bc6PHP - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/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.wsisp.com\/helps\/90189.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u521d\u8bc6PHP - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u4e00\u3001PHP\u6807\u51c6\u8bed\u8a00\u683c\u5f0fPHP\u8bed\u8a00\u6807\u8bb0&#xff1a;PHP\u7528\u901a\u4fd7\u7684\u8bdd\u6765\u8bb2\u5b83\u662f\u6bd4\u8f83\u968f\u610f\u7684\u4e00\u4e2a\u8bed\u8a00&#xff0c;\u5728PHP\u6587\u4ef6\u4e2d&#xff0c;\u91cc\u9762\u53ef\u4ee5\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/90189.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-08-04T11:49:32+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/08\/20260804114929-6a71d1c972415.png\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/90189.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/90189.html\",\"name\":\"\u521d\u8bc6PHP - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-08-04T11:49:32+00:00\",\"dateModified\":\"2026-08-04T11:49:32+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/90189.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/90189.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/90189.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u521d\u8bc6PHP\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u521d\u8bc6PHP - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","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.wsisp.com\/helps\/90189.html","og_locale":"zh_CN","og_type":"article","og_title":"\u521d\u8bc6PHP - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u4e00\u3001PHP\u6807\u51c6\u8bed\u8a00\u683c\u5f0fPHP\u8bed\u8a00\u6807\u8bb0&#xff1a;PHP\u7528\u901a\u4fd7\u7684\u8bdd\u6765\u8bb2\u5b83\u662f\u6bd4\u8f83\u968f\u610f\u7684\u4e00\u4e2a\u8bed\u8a00&#xff0c;\u5728PHP\u6587\u4ef6\u4e2d&#xff0c;\u91cc\u9762\u53ef\u4ee5","og_url":"https:\/\/www.wsisp.com\/helps\/90189.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-08-04T11:49:32+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/08\/20260804114929-6a71d1c972415.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"5 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/90189.html","url":"https:\/\/www.wsisp.com\/helps\/90189.html","name":"\u521d\u8bc6PHP - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-08-04T11:49:32+00:00","dateModified":"2026-08-04T11:49:32+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/90189.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/90189.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/90189.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u521d\u8bc6PHP"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/90189","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=90189"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/90189\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/90170"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=90189"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=90189"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=90189"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=90189"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}