国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

小案例:判斷輸入的字符串是不是PHP的關(guān)鍵字(key.php)

??? 2019-03-26 11:09:10 302
????:<?php$get = isset($_GET['in']) ? $_GET['in'] : '';$key = '__halt_compiler() abstract and array() as break callable case catch class clone const continue declare default
<?php
$get = isset($_GET['in']) ? $_GET['in'] : '';

$key = '__halt_compiler() abstract and array() as break callable case catch class clone const continue declare default die() do echo else elseif empty() enddeclare endfor endforeach endif endswitch endwhile eval() exit() extends final finally for foreach function global goto if implements include include_once instanceof insteadof interface isset() list() namespace new or print private protected public require require_once return static switch throw trait try unset() use var while xor yield';

$get = trim($get);
?>

<div>
<span style="color:red;">輸入PHP關(guān)鍵字:</span>
<form action="key.php" method='GET'>
<input type="text" name="in" id="">
<button style='color:red;'>提交</button>
</form>

</div>

<?php
if (!empty($get)) {
$get = strtolower($get);
if (strpos($key, $get)) {
echo "<span style='color:red;'>'{$get}' 是一個(gè)PHP關(guān)鍵字!</span>";
} else {
echo "<span style='color:red;'>輸入錯(cuò)誤,  '{$get}'  不是一個(gè)PHP關(guān)鍵字</span>";
}
}

?>


?? ???:查無(wú)此人?? ??:2019-03-26 16:51:08
???? ??:這個(gè)不是讓你寫(xiě)json數(shù)據(jù)嘛。怎么弄個(gè)字符串判斷。繼續(xù)加油吧。

??? ??

?? ??