dan182skater Posted June 7, 2006 Share Posted June 7, 2006 I have an html file I made with a blank area that I want to add a php file into. The php file is a small little file that is a billing system that I want to add to that blank area in my html file. How do I do this? I thought all I would need to do is use the php include function, but apparently I was wrong. Any help is appreciated. Thanks!Daniel Link to comment https://forums.phpfreaks.com/topic/11387-add-a-small-php-file-into-an-html-file/ Share on other sites More sharing options...
Ferenc Posted June 7, 2006 Share Posted June 7, 2006 the html file you want to have a php added to needs to be a php file...(your_file.php)then, where ever in the html...[code]<?php include 'my_incuded_file.php'; ?>[/code] Link to comment https://forums.phpfreaks.com/topic/11387-add-a-small-php-file-into-an-html-file/#findComment-42682 Share on other sites More sharing options...
trq Posted June 7, 2006 Share Posted June 7, 2006 You cant use php's include() function in a html file. If your using an apache server you might be able to use SSI's, but Im still not 100% sure they'll parse the php.[code]<!-- #include file="phpfile.php" -->[/code]Otherwise... if you have control of the server you could also enable .html files to be parsed as php, then the php include() function would work. Link to comment https://forums.phpfreaks.com/topic/11387-add-a-small-php-file-into-an-html-file/#findComment-42685 Share on other sites More sharing options...
Moon-Man.net Posted June 7, 2006 Share Posted June 7, 2006 The easiest way would be to rename the html document in question as <FILENAME.php> and then do what Ferenc said, just use php's Include function.Cheers,Nathan Link to comment https://forums.phpfreaks.com/topic/11387-add-a-small-php-file-into-an-html-file/#findComment-42696 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.