Re: .html or.php extension

From: Date: Sun, 08 Feb 2004 17:19:18 +0000
Subject: Re: .html or.php extension
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-177148@lists.php.net to get a copy of this message
E.H.Terwiel wrote:
My PHP system demands that files to be interpreted by PHP MUST have the .php extension. If I have an .html file with <?php ....?> in it, it won't interpret the PHP code. Unlike JavaScript, f.i. Is there a way to make the server do the PHP code anyway, in an HTML file ? Or must the action yes-php/no-php be taken before looking into the file ?
If you're using Apache, you can add .html to the list of file extensions php will parse.
The other way around is ok: put HTML code in a .php file...
Yes. You can also seperate html from php, and just include the html file in your php script. -- By-Tor.com It's all about the Rush http://www.by-tor.com

« previous php.general (#177148) next »