NYCPHP Meetup

NYPHP.org

[nycphp-talk] Parse HTML Files as PHP

tedd tedd at sperling.com
Sun Feb 22 15:53:50 EST 2009


At 3:10 PM -0500 2/22/09, Greg Rundlett (freephile) wrote:
>On Sun, Feb 22, 2009 at 8:44 AM, tedd <tedd at sperling.com> wrote:
>  > Furthermore, if you don't wrap your html code in a heredoc 
>wrapper, the html
>>  code will cause the script to crash.
>
>That's not correct.  If .html files are parsed through Mod_php, the
>default behavior of the PHP module is to output the contents just like
>text/html, which is why you have to add PHP processing instructions
>(aka "tags") to your PHP files to turn ON php i.e. <?php print
>("foo"); ?>    I'm saying that turning on PHP processing of regular
>HTML files will output HTML just like if you didn't pass the file
>through mod_php.
>
>--
>Greg Rundlett


Greg:

You are absolutely right.

I was thinking of using html without "<?php echo($whatever); ?>" and 
using php variables directly in the html code.

Cheers,

tedd

-- 
-------
http://sperling.com  http://ancientstones.com  http://earthstones.com



More information about the talk mailing list