PHP include and require Statements
PHP include statement to your web page
- The include and require statements are used to insert php pages to your web page
- Including files saves a lot of work and tme.
Step 01 main page design
<html>
<body>
<?php include 'header.php'; ?>
or
<?php require 'header.php'; ?>
</body>
</html>
Step 02 header page design
<html>
<head>
<style type="text/css">
.main {
height: 100;
width: 980px;
}
</style>
</head>
<body>
<div class="header_box">this is header</div>
</body>
</html>
use the .php extension for all pages to save
PHP include and require Statements
Reviewed by Unknown
on
1:40 PM
Rating:
No comments: