How can I setup php to read .html files?

Jon W

New member
I ran a search on google how to do this but I'm not seeing anything on the web that tells you how to do this. How is this done? I'm experienced enough with Linux so that isn't a problem. I own my server so changing file isn't a problem either.
I want it to read .php and .html files. So in other words if I make a .html document I want to be able to put PHP inside of that .html document and PHP will still read the PHP.
My question is simple.... I just want to know how I can make it so when i create a .html file and and say for explain I want to add some PHP inside of the .html file PHP will still read the PHP inside of the .html file. We all know that PHP will not read a .html file by default setting. So I know because I've see other people doing this setup PHP in apache so that when you create a .html file and say for explain you wanted to add some PHP to that .html document PHP will still read the PHP inside of the .html file.... Like I said, all I'm wanting to know is how do I setup PHP so that it'll read files that are .html as well. By default PHP will not read .html files, it will only read .php.
 
Your question is incomplete. HTML and PHP are used with different purposes. HTML is used to display data, and PHP is a server scripting language. You need to explain more about your problem.
 
It's not clear what you want to do. PHP is a language. You will need to phrase your question more precisely. Are you trying to make a PHP script that runs on a web server? If you want it to read .html files, do you mean off of the server's local hard drive, the client's computer, or off a web server? And what do you want to do with them?

You really have not explained your problem.

Update: Aha. So that's what you want. See the link below. If that's not what you need, let us know what web server you are using.
 
Back
Top