미션1
접속한 사람의 ip를 확인할 수있는 로그프로그램을 만들어라
테이블명 log
idx(숫자),ip(문자),page(문자),regdate(날짜)
1 192.168.0.1 news>index.php 2025-02-01
2 192.168.0.1 news>delete.php 2025-02-01
클래스명 : Logs
함수명: index,create,edit,delete
routes>
getLog()
ci4.st.kr/log/
ci4.s.t.kr/log/create 저장완료후 ci4.st.kt/log/success
ci4.st.kr/log/edit/1
ci4.st.kr/log/delete/1
drop table log;(log테이블 삭제)
CREATE TABLE log (
id int(11) NOT NULL AUTO_INCREMENT,
ip varchar(128) NOT NULL,
page varchar(128) NOT NULL,
regdate TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (id)
);
select * from log;
INSERT INTO log VALUES
(3,'192.168.0.1','log>index.php','2025-02-01 00:00:00');
(4,'192.168.0.1','log>index.php','2025-02-01 00:00:00');
(5,'192.168.0.1','log>index.php','2025-02-01 00:00:00');
(6,'192.168.0.1','log>index.php','2025-02-01 00:00:00');
(7,'192.168.0.1','log>index.php','2025-02-01 00:00:00');
(8,'192.168.0.1','log>index.php','2025-02-01 00:00:00');
(9,'192.168.0.1','log>index.php','2025-02-01 00:00:00');
(10,'192.168.0.1','log>index.php','2025-02-01 00:00:00');
(11,'192.168.0.1','log>index.php','2025-02-01 00:00:00');
#업로드가 가능한 게시판
CREATE TABLE board (
id int(11) NOT NULL AUTO_INCREMENT,
ip varchar(128) NOT NULL,
page varchar(128) NOT NULL,
regdate TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (id)
);