14 장 자료실 제작

Download 14 장 자료실 제작

If you can't read please download the document

Upload: hogan

Post on 17-Mar-2016

86 views

Category:

Documents


4 download

DESCRIPTION

14 장 자료실 제작. 첨부파일의 정보 처리 방법 이해 첨부파일을 서버에 저장 첨파푸일을 화면에 출력 첨부파일 다운로드 기법. 자료실의 개요 DB 테이블 설계 및 생성 첨부파일 업로드 처리 첨부파일 다운로드 처리. 1.1 결과 화면과 요구사항. [ 그림 14-1] 자료실의 글 내용보기 페이지. 1.1 결과 화면과 요구사항. 요구사항 세 개의 첨부파일 업 / 다운로드 가능 다섯 개의 첨부파일을 업로드할 수 있는 DB 설계 ( 추후 확장성고려 ) - PowerPoint PPT Presentation

TRANSCRIPT

PowerPoint

14 IT CookBook,PHP ()[ ]

. 136 5 5 () .

DB 1.1

[ 14-1] 1.1 / DB ( ) 500KB , / HTML 1.2 /download.sql list.php write_form.php ( )view.php insert.php ( )download.php delete.php data [ 14 -1] / 1.2

[ 14-2] 2. DB numintnot null, auto_increment, primary keyidchar(15)not nullnamechar(10)not nullnickchar(10)not nullsubjectchar(100)not nullcontenttextnot null regist_daychar(20)hitintfile_name_0char(40) 1 file_name_1char(40) 2 [ 14-2] (: download)2. DB file_name_2char(40) 3 file_name_3char(40) 4 file_name_4char(40) 5 file_copied_0char(30) 1 file_copied_1char(30) 2 file_copied_2char(30) 3 file_copied_3char(30) 4 file_copied_4char(30) 5 [ 14-2] (: download)download download.sql create table download ( num int not null auto_increment, id char(15) not null, name char(10) not null, nick char(10) not null, subject char(100) not null, content text not null, regist_day char(20), hit int, file_name_0 char(40), file_name_1 char(40), file_name_2 char(40), file_name_3 char(40), file_name_4 char(40),file_copied_0 char(30), file_copied_1 char(30), file_copied_2 char(30), file_copied_3 char(30), file_copied_4 char(30), file_type_0 char(30), file_type_1 char(30), file_type_2 char(30), file_type_3 char(30), file_type_4 char(30), primary key(num) );

4.1 [ 14-5]

14-1 view.php001 036 097
098 099 100 14-1 view.php101 102 2 pdf , 3 downloaded.pdf .file_exists() bool file_exists(string $filename) - : ,

. TURE, FALSE .fopen() resource fopen(string $filename , string $mode) - : () - :

. .

$mode . - 'r' : - 'w' : - 'b' : (binary)

[folder] resource.exe ($handle) . (.exe) . fpassthru() int fpassthru(resource $handle) - :

($handle) fclose() bool fclose(resource $handle) - :

($handle) . TRUE, FALSE .