Can t a PHP file be stored in html extension I ve heard that php is not supported by some browsers i m not sure What might be the remedy for this

0 votes

This is my sample code and it doesn't work with .html extension but it is working with the . php extension.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
   <head>
      <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
      <title>Untitled Document</title>
   </head>

   <body>
       <div>
          <?php echo 'Hello World!!' ?>
       </div>
   </body>
</html>

Is it that some browser doesn't support .php files? Can someone please explain this?

Jun 14, 2022 in PHP by narikkadan
• 63,600 points
435 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In PHP

0 votes
1 answer

What is meant by passing the variable by value and reference in PHP?

Hello, When the variable is passed as value ...READ MORE

answered Mar 27, 2020 in PHP by Niroj
• 82,840 points
3,269 views
0 votes
0 answers
0 votes
1 answer

What is the best way to allow plugins for a PHP application?

Hello @kartik, I've used, it's an attempt to ...READ MORE

answered Apr 15, 2020 in PHP by Niroj
• 82,840 points
734 views
0 votes
0 answers

What is the difference between POST and GET in HTML/PHP

I don't seem to understand what GET ...READ MORE

Jun 17, 2022 in PHP by narikkadan
• 63,600 points
388 views
0 votes
0 answers
0 votes
0 answers

What is meaning of tilde(~) symbol mean in the context of this PHP documentation page?

Please explain the significance of the tilde() ...READ MORE

Aug 5, 2022 in PHP by Kithuzzz
• 38,000 points
689 views
0 votes
2 answers

Define a SQL query? What is the difference between SELECT and UPDATE Query? How do you use SQL in SAS?

HI.. SQL is Structured Query Language, which is ...READ MORE

answered Aug 8, 2020 in PHP by anonymous
10,545 views
0 votes
1 answer

Vertically centering text in a div

Try this code: .smallUnitBox { ...READ MORE

answered Sep 3, 2018 in Blockchain by digger
• 26,740 points
836 views
0 votes
1 answer
0 votes
0 answers

Anyone can help me out to understand the semantic of (document.getElementBYId("demo").innerHTML="Hello") ?

Hello guys, Can Someone helps me to find ...READ MORE

Jan 17, 2020 in Web Development by anonymous
• 37,520 points
942 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP