how i include example.php file into index.html?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
venkatesh.svs
Forum Newbie
Posts: 12
Joined: Wed Jan 06, 2010 1:30 am

how i include example.php file into index.html?

Post by venkatesh.svs »

can anybody help to include example.php file into index.html?
User avatar
timWebUK
Forum Contributor
Posts: 239
Joined: Thu Oct 29, 2009 6:48 am
Location: UK

Re: how i include example.php file into index.html?

Post by timWebUK »

You don't, you would include example.php within index.php

Code: Select all

<?php
 
include 'example.php';
 
?>
User avatar
SimpleManWeb
Forum Commoner
Posts: 57
Joined: Wed Dec 30, 2009 4:15 pm
Location: New Hampshire, USA

Re: how i include example.php file into index.html?

Post by SimpleManWeb »

You don't, you would include example.php within index.php
I completely agree with timWebUK, you should change your index.html file to index.php and then your include will work. However, I have seen sites in the past that have successfully included a php file within a html file. I'm not sure what the settings on the server need to be in order for this to work, but it is possible.
Post Reply