웹 페이지 구축 - index, top
지금까지 php, db, cookie, session 등에 대해서 알아봤으니 직접 웹페이지를 구축해 보도록 하겠습니다.
기본적으로 접속을하면 나타나는 index.php와 top.php(상단부분)을 구현해 보도록 하겠습니다.
이미지 파일
index.php
1 2 3 4 5 6 7 8 9 10 11 12 | <html> <head> <meta HTTP_EQUIV="Content-Type" CONTENT="text/html; charset=ks_c_5601-1987"> <title>:: Welcome to My PHP World! ::</title> </head> <frameset framespacing='0' border='0' frameborder='0' rows='370,*'> <frame name='top' src='top.php' scrolling='auto' noresize> <frame name='main' src='main_init.php' scrolling='auto' noresize> </frameset> </html> | cs |
top.php
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 | <?php session_start(); ?> <html> <head> <title>:: Welcome to My php world!</title> <link rel='stylesheet' href='style.css' type='text/css'> </head> <body leftmargin='0' topmargin='0' marginwidth='0' marginhegith='0'> <table width='766' align='center' cellspacing='0' cellpadding='0' border='0'> <tr> <td> <table width='766' cellspacing='0' cellpadding='0' border='0'> <!-- top title --> <tr> <td colspan='10'> <img border='0' src='img/sub_title.gif' width='766' height='146'> </td> </tr> <tr> <td height='8' colspan='10'> <img border='0' src='img/blank.gif' widht='1' height='8'> </td> </tr> <tr> <td> <a href='main.php' target='main'> <img src='img/menu_01.gif' width='87' height='47' border='0' alt=''> <?php if(!$_SESSION['userid']) { echo " <td> <a href='login/login_form.html' tartget='main'> <img src='img/menu_02.gif' width='87' height='47' border='0' alt=''> </a> </td>"; } else { echo "<td> <a href='login/logoff.php' target='main'> <img src='img/menu_10.gif' width='87' height='47' border='0' alt=''> </a> </td>"; } if(!$_SESSION['userid']) { echo "<td> <a href='login/member_form.html' tartget='main'> <img src='img/menu_03.gif' width='84' height='47' border='0' alt=''> </a> </td>"; } else { echo "<td> <a href='login/modify_memberinfo.php' target='main'> <img src='img/menu_11.gif' width='86' height='47' border='0' alt=''> </a> </td>"; } ?> <td> <a href='guestbook/guestbook.php' target='main'> <img src='img/menu_04.gif' width='86' height='47' border='0' alt=''> </a> </td> <td> <a href='freeboard/list.php' target='main'> <img src='img/menu_05.gif' width='90' height='47' border='0' alt=''> </a> </td> <td> <a href='notice/list.php' target='main'> <img src='img/menu_06.gif' width='90' height='47' border='0' alt=''> </a> </td> <td> <a href='qna/list.php' target='main'> <img src='img/menu_07.gif' width='85' height='47' border='0' alt=''> </a> </td> <td> <a href='down/list.php' target='main'> <img src='img/menu_08.gif' width='88' height='47' border='0' alt=''> </a> </td> <td> <a href='survey/survey.php' target='main'> <img src='img/menu_09.gif' width='89' height='47' border='0' alt=''> </a> </td> </td> </tr> </table> </td> </tr> </table> </body> </html> |
main_init.php
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | <html> <head> <title>:: Welcome to My php world!</title> <link rel='stylesheet' href='style.css' type='text/css'> </head> <body leftmargin='0' topmargin='0' marginwidth='0' marginheight='0'> <table width='766' align='center' cellspacing='0' cellpadding='0' border='0'> <tr height='150'> <td></td> </tr> <tr align='center'> <td> Main </td> </tr> </table> </body> </html> | cs |
완성된 페이지
'High Level Technique > Web Hacking' 카테고리의 다른 글
웹 페이지 구축 - 자유게시판 (0) | 2016.11.10 |
---|---|
웹 페이지 구축 - 회원가입, 로그인 (0) | 2016.11.10 |
쿠키와 세션 (0) | 2016.11.08 |
PHP MySQL 연동 (0) | 2016.11.07 |
MySQL (0) | 2016.11.07 |