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 .


Top Related