JavaScript でテキスト ファイル ( http://example.com/directory/file.txtのような場所) を開き、 ファイルに特定の文字列/変数が含まれているかどうかを確認することは可能ですか?
PHP では、次のような方法で簡単に実現できます。
$file = file_get_contents("filename.ext");
if (!strpos($file, "search string")) {
echo "String not found!";
} else {
echo "String found!";
}
これを行う方法はありますか?.js
Node.js、appfogで「関数」をファイルで実行しています。