File Index.php break in Dreamweaver CS3

Dreamweaver tutorial this time is the continuation of yesterday's tutorial is to create a website in Dreamweaver CS3, after yesterday we made the index.php file now we will break the file that will Easily edited.
Immediately, dreamweaver tutorial this time is break the index.php file with Dreamweaver,
Open your program Adobe Dreamweaver, then open the file index.php.
3 Create a new file, press Ctrl + N select PHP, then save named:
  1. header.php
  2. sidebar.php
  3. footer.php
Once you make it to 3 files, delete all the existing code in it. Now we will combine all of these files into the file index.php
Yesterday the composition of our website such as the following code:
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
<body>
<div id="header">
<a href="index.php"><img src="images/logo.png" alt="logo websiteku" border="0" /></a>
<p>Deskripsi website anda disini</p>
</div>
<div id="navigasi">
  <table border="0" cellspacing="5" cellpadding="5">
    <tr>
      <td><a href="index.php">Home</a></td>
      <td><a href="#">Profile</a></td>
      <td><a href="#">Gallery</a></td>
      <td><a href="#">Contact</a></td>
    </tr>
  </table>
</div>
<div id="conten-wrapper">
<div id="conten"></div>
<div id="sidebar"></div>
</div>
<div id="footer"></div>
</body>
Then cut code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<div id="header">
<a href="index.php"><img src="images/logo.png" alt="logo websiteku" border="0" /></a>
<p>Deskripsi website anda disini</p>
</div>
<div id="navigasi">
  <table border="0" cellspacing="5" cellpadding="5">
    <tr>
      <td><a href="index.php">Home</a></td>
      <td><a href="#">Profile</a></td>
      <td><a href="#">Gallery</a></td>
      <td><a href="#">Contact</a></td>
    </tr>
  </table>
</div>
Paste into header.php, then combine it with the file index.php header.php file do type the following code
1
<?php include ('header.php') ?>
put in place a code which you cut before or below the <body>
Next we will combine or connect sidebar.php file with the file index.php. Cut the following code:
1
<div id="sidebar"></div>
paste into sidebar.php, and type the following code <div id=”conten”></div>
1
<?php include ('sidebar.php') ?>
Finally we will combine with the footer.php file index.php file, cut the following code:
1
<div id="footer"></div>
Paste into a file footer.php, and type the following code just above the </ body>
1
<?php include ('footer.php') ?>
So in the folder your website we already have 4 files, namely:
  1. index.php
  2. header.php
  3. sidebar.php
  4. footer.php
Meanwhile, to make other pages, for example, profile, contact, and the gallery you just copy the index.php file and change its name to the name of the page, and for details later I will explain in the next Dreamweaver tutorial.
So in conclusion if you have a wish to edit or change in the sidebar, you just open the file sidebar.php, and if you have many files that you do not need to change all your files, simply sidebar.php only need to be altered, it is because the function of include earlier.

No comments :