+ 3
Can we include HTML file in php code ?
I have my header, footer in HTML extension can I include it into the php file using include function.
8 Respostas
+ 4
Yes,
We can include it into our php pages.
+ 2
Yes you can
<?php include('file.html'); ?>
<?php include 'file.html'; ?>
Both will work
+ 1
yes you can . juste open the PHP statement <?PHP and write you code and finish with > if you want to use thé incluse fonction, you must sage yiyr file with PHP extension
+ 1
of course yes
+ 1
<?php
include 'header.html';
//your codes here
include 'footer.html';
//be sure including your actual path
?>
0
yes
- 2
you can do this with the include/require function.
require_once 'header.html';
the content is parsed as php so you can use php in those files even if they are .html
- 4
Yes. like that
<?php echo "<h1>Title </h1>"; ?>
Or like that.
<?php echo ?>
<h1>Title </h1>
<p>Lorem ipsum... </p>
<?php ?>