Jump to content


[Inactive] php in html file

php html

  • This topic is locked This topic is locked
2 replies to this topic

#1 adrianol



  • Members
  • 1 posts

Posted 13 November 2020 - 04:52 AM



I can't run php in a html file on johhny. What do I need to do?

#2 maicol07


    Rank IV Member

  • Members
  • PipPipPipPip
  • 284 posts
  • Gender:Male
  • Location:Italy
  • Interests:Python, Android, Windows, HTML, PHP, JS, WordPress

Posted 13 November 2020 - 08:28 AM

@adrianol you can't execute PHP code in an HTML file.

You need to change the file extension from .html to .php

Then you can write HTML code with PHP code

Python, Android and web developer.

Check out:

My website
My Blog

My GPlay Developer Page

#3 wolstech


    Rank X Member

  • Root Admin
  • 13,561 posts
  • Gender:Male
  • Location:Pennsylvania

Posted 13 November 2020 - 12:26 PM

It is possible to add a handler to make HTML files process as PHP, but the typical recommendation is to do what maicol07 said and change the extension to .php 

Please do not PM me for support. Posting on our forums lets all of us learn.
Do you play Minecraft? | Server Monitors | And the Dumbass of the Decade award goes to...

Also tagged with one or more of these keywords: php, html

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users