페이지전환 2가지 예 - META태그 - header사용 정보
그누보드 페이지전환 2가지 예 - META태그 - header사용본문
[1] meta 태그 사용 예
http://domain/index.html 파일 내용
<HTML>
<HEAD>
<META HTTP-EQUIV="refresh" CONTENT="0; URL=http://domain/list2">
</HEAD>
</HTML>
[2] header사용 예
http://domain/index.php
(만약 서버 환경설정파일 내용중 html문서내에서 php스크립트를 사용할 수 있다면 파일종류를
index.php(jsp, asp 등)가 아닌 index.html(htm)으로 지정해도 상관없음)
http://domain/index.html(htm,asp,jsp,php ...) 파일 내용
<?
header("Location:./list2");
?>
http://domain/index.html 파일 내용
<HTML>
<HEAD>
<META HTTP-EQUIV="refresh" CONTENT="0; URL=http://domain/list2">
</HEAD>
</HTML>
[2] header사용 예
http://domain/index.php
(만약 서버 환경설정파일 내용중 html문서내에서 php스크립트를 사용할 수 있다면 파일종류를
index.php(jsp, asp 등)가 아닌 index.html(htm)으로 지정해도 상관없음)
http://domain/index.html(htm,asp,jsp,php ...) 파일 내용
<?
header("Location:./list2");
?>
댓글 전체