処理内容 tagを検索する実装 tag Search form tag Search Action Search file database for a tag return value 検索フォーム GetValueForm.phpと保存してください。 <h3> Search database for a tag</h3> <form action="GetValueAction.php" method="post" enctype=application/x-www-form-urlencoded>
処理内容 受け取ったデータは、2種類のファイルに保存する。 tag-valueペアをファイルに保存する。 ログファイル accept form date and store to file. Store a tag-value pair in the file Append log on logfile tag-valueペアをファイルに保存する 受信したtag-valueペアをファイルに保存する。ファイル名はtagNameそのまま、拡張子はtxtになる。 [tagName].txt ソースコード $fh =
このシリーズは、TinyWebDB の実装を目的とする。 TinyWebDBとは まずTinyWebDB のリポジトリを確認。 https://github.com/edu2web/tinywebdb-php TinyWebDB Protocol: Action URL Post Parameters Response Get Value {ServiceURL}/getvalue tag JSON: [“VALUE”,”{tag}”, {value}] Store A Value {ServiceURL}/storeavalue tag,value JSON: [“STORED”,