Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9246199
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T09:26:23+00:00 2026-06-18T09:26:23+00:00

I am writing the following html code: <!DOCTYPE html> <html xmlns=http://www.w3.org/1999/xhtml xml:lang=en lang=en> <head>

  • 0

I am writing the following html code:

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> 

<script type="text/javascript">
    function detectBrowser(){
        if(navigator.appName === "Microsoft Internet Explorer"){
            window.open("redirect.html", "_parent");
        }
    }
</script>
</head>

<body onload="detectBrowser()">
<div class="mainBody">  
<?php
    echo "test";
?>
</div>
</body>
</html>

But the php block doesn’t display test for me. It looks like it is not parsed and I can see the php code in the webpage’s source. Any one can tell the problem?
Thank you

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T09:26:24+00:00Added an answer on June 18, 2026 at 9:26 am

    You can enable parsing of PHP in files with .html extensions in your httpd.conf file.

    Look for a line like this and make sure .html is an option.

     AddType application/x-httpd-php .php .php3 .phtml .html 
    

    You could probably add it to an .htaccess file in the docroot of you site as well, but I’ve not tried this personally.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

http://ruby-doc.org/stdlib-1.8.7/libdoc/net/http/rdoc/Net/HTTP.html After reading the doc very carefully, I'm writing the following code snippet for
I am writing in php. I have the following code: $folder_to_zip = /var/www/html/zip/folder; $zip_file_location
I have the following code: private function html_Headers() { $data = ' <!DOCTYPE HTML>
I am writing video code in an iphone, based on HTML. With the following
I am writing the following code to find out the required strings are present
I got tired of writing the following code: /* Commenting out irrelevant parts public
To dumb it down, I have the following code highlighting my exact problem: <!DOCTYPE
I was wondering if there is a shorter way of writing the following code:
I'm writing code that automatically generates HTML, and I want it to encode things
Writing a code that does the following: Adds a mouse listener to a web-page

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.