要素Aが配列Bの中に存在するか調べるには in_array を使う。
以下の例では、配列Bの中に要素Aが存在するので「Got elementA」が出力されます。
$arrayB = array("elementA", "NT", "Irix", "Linux");
if (in_array("elementA", $arrayB)) {
echo "Got elementA";
}
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that the RSA host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
Please contact your system administrator.
Host key verification failed.
Macからサーバにsshで接続しようとした時に、上記のようなエラーが出た場合は、以下のコマンドを実行して known_hosts を削除します。
$ cd ~/.ssh
$ rm known_hosts
この投稿へのコメント
コメントはまだありません。