Make html pages work like php without changing extension

and with out change any server settings.

is there a header Content-Type: i can use ?
armasmikeAsked:
Who is Participating?
 
Dave BaldwinConnect With a Mentor Fixer of ProblemsCommented:
@marqusG is right (if you are using Apache) but you do have to have PHP installed on the server.
0
 
Loganathan NatarajanConnect With a Mentor LAMP DeveloperCommented:
work like php

It cannot be function the html page as php.  but we can configure on the server the php pages to act as .html extension.
0
 
Loganathan NatarajanConnect With a Mentor LAMP DeveloperCommented:
Because, PHP is a pure server-side programming which will be executed through server.. but HTML is just plain page, it cannot function as PHP
0
Cloud Class® Course: Microsoft Office 2010

This course will introduce you to the interfaces and features of Microsoft Office 2010 Word, Excel, PowerPoint, Outlook, and Access. You will learn about the features that are shared between all products in the Office suite, as well as the new features that are product specific.

 
Marco GasiConnect With a Mentor FreelancerCommented:
You can simply edit your existing .htaccess file adding this line:

AddType application/x-httpd-php .php .html

If you have not a .htaccess file, simply create a new one empty text file, paste the line aboce and save it as .htaccess with no extension; then place it in your document root directory.

This way, each html page will be treated as a php page.

More info here: http://php.about.com/od/advancedphp/p/html_php.htm

Cheers
0
 
armasmikeAuthor Commented:
Yep thats what i thought
0
 
Marco GasiFreelancerCommented:
I think only the comment ID: 38371069 gave a solution to your problem: breaking points seems a wrong choice...

Good luck with your project
0
 
armasmikeAuthor Commented:
yes comment ID: 38371069 gave more info on how to do it. But ID: 38370919 say the same thing with out giving all the info. And ID: 38371164 say that it will only work on a server using Apache that i didn't know. So that info was helpful

Also my question saids "with out change any server settings. "

so  ID: 38371069 is changing server settings by editing the .htaccess file.

So i thing breaking points up to all was the right thing to do.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.