10回 基礎プログラミング II レポート課題 氏名:酒井信市郎 学籍番号:c1090733 語学クラス:英語1 コース(系):政策 1、A pstore を cgi に組み込むには、まず require 'pstore' によって'pstore' を 用い、入力されたデータを保存するよう定義する。 次に db = PStore.new("*.db") と入力し、db(データベース)の型式で hash として作成する。これにより、入力されたデータは pstore の設定に従い、*.db(デー タベースファイル)に保存されるようになる。 さらに任意のプログラムを
内に挿入し、ユーザーにデータを 入力させるスペースを確保する。 また db.transaction do により、変数に入力されたデータを読み込んで表示さ せる。 2、Gのオンライン授業アンケート http://roy/~c109073/ http://roy/~c109073/advertise2/rubycgi/r2_cgi_best.html オンライン授業アンケート


その他感想をお書き下さい:

#!/usr/koeki/bin/ruby $KCODE = 'e' require 'cgi' cgi = CGI.new("html4") print("Content-type: text/html; charest=EUC-JP\n\n") arv = cgi["kimoti"] kimoti = cgi["kimoti"] comment = cgi["comment"] print("\n") print("\n") print("オンライン授業アンケート\n") print("\n") print("\n") print("

") print("

結果です.

\n") printf("

あなたはプログラミングに対して %s と思っているんですね.

\n", kimoti) printf("

%s という感想のようですね.

\n", comment) print("

ご協力ありがとうございました。
") print("\n") print("\n") <実行結果> pan{c109073}% ./r2_cgi_best.rb [~/public_html/advertise2/rubycgi] (offline mode: enter name=value pairs on standard input) Content-type: text/html; charest=EUC-JP オンライン授業アンケート

結果です.

あなたはプログラミングに対して と思っているんですね.

という感想のようですね.

ご協力ありがとうございました。
pan{c109073}% [~/public_html/advertise2/rubycgi] <考察> if else を使うのをやめて、printfで出るようにしました。 4、感想 http://roy/~c109079/advertise2/rubycgi/r2_cgi_best.html 笹木郁哉さんの作品です。 手間もかかっているし、見た目も綺麗でわかりやすくていいと思いました。 5、参考文献など http://roy/~madoka/2010/r2/10/ 第10回講義ページ 協力者:笹木郁哉