オンラインテスト

Similar documents
10/ / /30 3. ( ) 11/ 6 4. UNIX + C socket 11/13 5. ( ) C 11/20 6. http, CGI Perl 11/27 7. ( ) Perl 12/ 4 8. Windows Winsock 12/11 9. JAV


Web STEPS Web Web Form Cookie HTTP STEPS Web

ohp.mgp

JavaScript¥×¥í¥°¥é¥ß¥ó¥°ÆþÌç

wide94.dvi

untitled

ii II Web Web HTML CSS PHP MySQL Web Web CSS JavaScript Web SQL Web

石井.PDF

インターネットマガジン1996年3月号―INTERNET magazine No.14

ORCA (Online Research Control system Architecture)

インストール取扱説明書

山梨県ホームページ作成ガイドライン

untitled

JavaScript演習

JavaScript 演習 2 1


() < > </ > / HTML SGML HTML 1.1 DTD DTD ( DTD (prolog) )SGML 1. DTD ( ) 2. DTD <!-- DTD-- > <!ELEMENT MAIL - - ((TO,FROM)?,DATE?,BODY) > <!ELEMENT TO

54 5 PHP Web hellow.php 1:<?php 2: echo "Hellow, PHP!Y=n"; 3:?> echo PHP C 2: printf("hellow, PHP!Y=n"); PHP (php) $ php hellow.php Hellow, PHP! 5.1.2

Homepage HTML+CSS Flash JavaScript Homepage Homepage Homepage Homepage Web HTML Hyper Text Markup Language XHTML XHTML HTML5 CSS Cascading Style Sheet

実験 5 CGI プログラミング 1 目的 動的にWebページを作成する手法の一つであるCGIについてプログラミングを通じて基本的な仕組みを学ぶ 2 実験 実験 1 Webサーバの設定確認と起動 (1)/etc/httpd/conf にある httpd.conf ファイルの cgi-bin に関する

Web

0序文‐1章.indd

untitled

JavaScript の使い方

GulfStar1.5ユーザーマニュアル

FileMaker Server Getting Started Guide

pdf


付録B

メディプロ1 Javaサーブレット補足資料.ppt

A/B WWW MTA/MSP sendmail POP/IMAP apache WWW 1 1 sendmail uw imap apache WWW host host subnet1: /24 IF1: router & server mail and

FileMaker Server 9 Getting Started Guide

Lotus Domino XML活用の基礎!

untitled

07_経営論集2010 小松先生.indd

FileMaker Server Getting Started Guide

untitled

Web プログラミング 1 JavaScript (4) (4 章 ) 2013/7/17( 水 ) 日時 講義内容 4/10 ( 水 ) ガイダンス Web (1 章 ) 4/17 ( 水 ) HTML+CSS (1) (2 章 ) 4/24 ( 水 ) HTML+CSS (2) (2 章 ) 5

hands_on_4.PDF

GPS携帯端末を用いた近隣バス停位置と

CAS Yale Open Source software Authentication Authorization (nu-cas) Backend Database Authentication Authorization Powered by A

CSS

インターネットマガジン2001年9月号―INTERNET magazine No.80

Windows Web Windows Windows WinSock

2009 Web B012-1

AJAXを使用した高い対話性を誇るポートレットの構築

Word97によるホームページの作成.PDF

untitled

第 8 回の内容 クライアントサイド処理 JavaScript の基礎

FileMaker Server Getting Started Guide

ルール&マナー集_社内版)_修正版.PDF

HTML Java Tips dp8t-asm/java/tips/ Apache Tomcat Java if else f

JavaScript演習

johokiso-webpage-large

biz-Stream v4 各種機能別動作環境一覧表

Transcription:

1. 2. JavaScript 3. Perl 4. CGI

1. WWW HTML WWW World Wide Web HTML Hyper Text Markup Language XML, XHTML

Java (.java) JavaApplet (.class,.jar) JavaServlet (.jsp) JavaScript (.html) CGI (.cgi) SSI (.shtml) ActiveX (.asp) Perl(.pl)

WWW on Apache IIS AN HTTPD WWW on Internet Explorer IE Netscape Navigator

WWW JavaScript JavaApplet Java on WWW CGI (Common Gateway Interface) SSI (Server Side Include) JavaServlet ActiveX

JavaScript JavaApplet JavaServlet ActiveX CGI + Perl SSI + Perl

2. JavaScript Web time.htm gree.htm button.htm

time.htm <html> <body> <script language= JavaScript > var now = new Date(); document.write( now, <br> ); </script> </body> </html> 1. time.htm 2. time2.htm

gree.htm <script> hour = (new Date()).getHours(); if( hour < 12 ) gree = "Morning"; else gree="hello"; document.write(gree); </script> gree2.htm 1. gree.htm 2.

button.htm <script language= JavaScript > function WinOpen() { window.open( http://www.kyusan-u.ac.jp ); } </script> <input type= button value=, onclick= WinOpen() >

3. Perl Perl HelloWorld hello.pl time.pl

HelloWorld hello.pl 1. 2. print hello world. n ; 3. hello2.pl 4. 5. Perl perl hello2.pl

time2.pl 1. asperl 2. hello2.pl 3. 4. time.pl print hello world. n ; $now = localtime(time); print $now; 5.

4. CGI WWW CGI Perl Perl HelloWorld hello.cgi time.cgi gree.cgi wtime.htm

HelloWorld hello.cgi 1. asperl hello.cgi print context-type: text/html n n ; print <html> ; print <body> ; print Hello World n ; print </body> ; print </html> ; 2. Web http://localhost/~user/cgi-bin/hello.cgi

time.cgi 1. asperl time.cgi print context-type: text/html n n ; $now = localtime( time ); print <html> ; print <body> ; print $now; print </body> ; print </html> ; 2. Web http://localhost/~user/cgi-bin/time.cgi

gree.cgi 1. asperl gree.cgi print context-type: text/html n n ; ($sec, $min, $hour) = localtime(time); if( $hour < 10 ) { $msg = "Morning" } else { $msg = "Hello" }; print <html><body> ; print $msg, " World";print <html> ; print </body> ; print </html> ; 2. Web http://localhost/~user/cgi-bin/gree.cgi

wtime.htm 1. wtime.htm <html><body> <form action= cgi-bin/time.cgi method= POST > <input type= submit value= What time? > </form> </body></html> 2. Web http://localhost/~user/wtime.htm

1. 2. 3. Windows

1. HTML) CGI

WWW test2.htm <HTML><body> <form method= POST action= cgi-bin/sendtest2.pl > WWW <p> <textarea name= comment > </textarea><p> <input type= submit > </form></body></html> sendtest2.cgi

test2.htm <HTML><body> <form method= POST action= cgi-bin/sendtest2.pl > WWW <p> <textarea name= comment > </textarea><p> <input type= submit > </form></body></html>

sendtest2.pl (1) require cgi-bin.pl &ReadParse; $comment=$in{ comment }; $mailto= naka@kyusan-u.ac.jp ; $sendmail= /usr/lib/sendmail open(mail, $sendmail $mailto ); print MAIL Subject: Answers n ; print MAIL $comment; close(mail);

sendtest2.pl (2) print Context-type:text/html n n ; print <html> ; print <body> ; print ; print </body> ; print </html> ;

2. ID CGI HTML CGI Perl & Excel Excel HTML

WWW data.txt [test:1234] naka@kyusan-u.ac.jp # <h3> </h3> # # 1. 1:, 2: exectest.cgi 2. a:, b: 3. a., b., c., d., e. -- 1x60 -- 5x80 sendtest.cgi Perl & Excel

exectest.pl sendtest.pl jcode.pl, cgi-lib.pl CGI perl cgi-bin data.txt test.htm

data.txt [test:1234] naka@kyusan-u.ac.jp # <h3> </h3> # # 1. 1:, 2: 2. a:, b: 3. a., b., c., d., e. -- 1x60 -- 5x80

test.htm

exectest.pl

Received: (qmail 23593 invoked by uid 60001); 23 Jul 2003 03:44:12-0000 Date: 23 Jul 2003 03:44:12-0000 Message-ID: <20030723034412.23592.qmail@star2.ip.kyusan-u.ac.jp> Subject: test From: testuid@ip.kyusan-u.ac.jp To: naka@kyusan-u.ac.jp [-choice-] 1 b abe [--text--] [--text--]

Perl getcsv.pl while(<stdin>){ if( /^From: ([^@]+)@/ ){ $from = $1;} elsif( /^Date: S+, ( d+ w+ d+) ( d+: d+: d+)/ ){ $date = $1; $time = $2;} elsif( /^ [-choice- ] (.*)$/ ){ $choice = $1;&jcode'convert(*from, 'sjis'); print " "".$from." ", "".$date." ", "".$time." ""; print ",".join(',',split(/ s/,$choice));} elsif( /^ [--text-- ] (.*)$/ ){ text = $1; &jcode'convert(*text, 'sjis'); print ", "".$text." "";}}

Perl Excel

Excel HTML

3. Windows AN HTTPD Active Perl next,next,... Perl Perl C: Perl bin cgi-lib.pl jcode.pl cgi-bin wsendmail.txt SMTP sendmail.cgi C: Perl bin

public_html [ ] index.htm [ ] cgi-bin [CGI ] cgi-lib.pl, jcode.pl [ ] exectest.pl, sendtest.pl onlinetest test.htm data.txt

AN HTTPD 1.42h http://www.st.rim.or.jp/~nakata/ Active Perl 5.8.0.806 http://www.activestate.com/ Perl v.2.0.4.5 http://homepage3.nifty.com/aokura/ cgi-lib.pl http://cgi-lib.berkeley.edu/ jcode.pl http://srekcah.org/jcode/ wsendmail.txt http://wan.magical.gr.jp/txt/winsendmail.htm

&URL Q&A Perl & CGI IDG ISBN4-87280-457-0 Perl ISBN4-7741-98717-0 WWW http://tohoho.wakusei.ne.jp/www.htm FUJI21 CGI E http://www.fuji21.jp/easycgi/index.html