Jump to content

Problem with embedded PHP in HTML


Tom_K

Recommended Posts

Hi and thanx for this great and free service that you provide!

 

The problem that i have is that i can't see the embedded php in my html documents. It seems that the parser won't work.

I already have added "AddHandler x-httpd-php .html .htm" at the end of my .htaccess file (I checked it at cpanel too).

 

I made two files:

 

testt.php

<?php echo "I LOVE PHP!"; ?>

 

testt.html

<html>
<head></head>
<body>
<h1>
<?php echo "I LOVE PHP!"; ?>
</h1>
</body>
</html>

 

The first file I can view it in my browser but when I open the second one I see a blank page.

You can check it by yourself:

http://ntominator.heliohost.org/testt.php

http://ntominator.heliohost.org/testt.html

 

Username: tomk

Domain name: ntominator.heliohost.org

 

PS: Sorry for my english but it's not my native language!

Link to comment
Share on other sites

I already have added "AddHandler x-httpd-php .html .htm" at the end of my .htaccess file (I checked it at cpanel too).

 

Use this instead:

 

AddHandler application/x-httpd-php5 .html .htm

 

Notice the number 5 at the end?

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...