Hello guys, I need to know something. Can we generate HTML output using PHP ?
Check this site. This is a sample review,
http://www.mouthshut.com/review/Apple_M ... 734-1.html
I am very much sure that this site is PHP based, but then my question is, how is it delivering contents in HTML?
Thanks in advance.
PHP output in HTML page
Moderator: General Moderators
PHP output in HTML page
Last edited by anand on Sun May 24, 2009 3:41 pm, edited 1 time in total.
- jayshields
- DevNet Resident
- Posts: 1912
- Joined: Mon Aug 22, 2005 12:11 pm
- Location: Leeds/Manchester, England
Re: PHP output in HTML page
Don't post in red. PHP is primarily used for producing HTML. Use the echo operator to output whatever you want to the client.
Do you mean the .html extension? That is probably an Apache configuration which is telling it to parse .html files as PHP applications. Some websites do things like this for SEO.
Do you mean the .html extension? That is probably an Apache configuration which is telling it to parse .html files as PHP applications. Some websites do things like this for SEO.
Re: PHP output in HTML page
Edited.jayshields wrote:Don't post in red. PHP is primarily used for producing HTML. Use the echo operator to output whatever you want to the client.
yea, Echo method is common. I meant the .html extension.
Okay. I got it. Thanks. This can also be done with .htaccess file. Right.jayshields wrote:Do you mean the .html extension? That is probably an Apache configuration which is telling it to parse .html files as PHP applications. Some websites do things like this for SEO.
I thought they did it using .htacess file but if i replace filename with .php , it doesn't open up.
Thanks for clearing the confusion though.