Jump to content

Add a small php file into an html file


dan182skater

Recommended Posts

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

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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.