rockinaway Posted May 11, 2007 Share Posted May 11, 2007 If I have my theme in HTML files and lines which are part of an array in my PHP file, how can I get them to be used in the HTML file? Since it is HTML I can't have an include etc... right? Quote Link to comment https://forums.phpfreaks.com/topic/50945-html-theme-separate-from-php-page/ Share on other sites More sharing options...
redbullmarky Posted May 11, 2007 Share Posted May 11, 2007 what have you tried? as long as the file has a .php extension, you can include if you need to - just enclose the include in <?php ?> tags Quote Link to comment https://forums.phpfreaks.com/topic/50945-html-theme-separate-from-php-page/#findComment-250607 Share on other sites More sharing options...
per1os Posted May 11, 2007 Share Posted May 11, 2007 You can always rename the html files to .php and than you can. That or you can add .html as being parsed as PHP via Apache httpd.conf file. If that is not what you are looking for, please elaborate. Quote Link to comment https://forums.phpfreaks.com/topic/50945-html-theme-separate-from-php-page/#findComment-250609 Share on other sites More sharing options...
rockinaway Posted May 11, 2007 Author Share Posted May 11, 2007 Nope I want to have the HTML file as a HTML file, no PHP. Any class I can make? ... And doing it via Apache won't change it for everyone, I need it for everyone... Quote Link to comment https://forums.phpfreaks.com/topic/50945-html-theme-separate-from-php-page/#findComment-250610 Share on other sites More sharing options...
redbullmarky Posted May 11, 2007 Share Posted May 11, 2007 might be worth looking into template engines. Smarty is one, or if you wanna build your own simple version: http://www.massassi.com/php/articles/template_engines/ good luck! Quote Link to comment https://forums.phpfreaks.com/topic/50945-html-theme-separate-from-php-page/#findComment-250669 Share on other sites More sharing options...
rockinaway Posted May 11, 2007 Author Share Posted May 11, 2007 Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/50945-html-theme-separate-from-php-page/#findComment-250685 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.