Resolved PHP in HTML

Discussion in 'Mac Programming' started by AdrianK, Jan 6, 2012.

  1. AdrianK, Jan 6, 2012
    Last edited: Jan 6, 2012

    macrumors 68020

    Feb 19, 2011
    Sorry if this is a bit of a silly question, but I'm having some trouble getting php inside HTML working on 10.7.2.

    The same code inside a .php file works fine. I'm using the version of Apache that ships with OS X and I've uncommented out the php5 module in httpd.conf.

    Putting this inside a .html file will not show anything in a web browser.
    echo "Testing 1, 2, 3";
    Any ideas?
  2. macrumors 6502a


    Jan 7, 2009
    Paris, France
    Because this shouldn't be a html file but a php file as there is php code in it.
  3. thread starter macrumors 68020

    Feb 19, 2011
    Just re-read the page on it - epic fail on my part :( Thanks.

Share This Page