php code embedded inside html page not working.

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • sams

    #1

    php code embedded inside html page not working.

    How do I make or workaround in my Apache server to parse *.html files
    for
    <?php ?> code embedded in it?

    Currently php recognises <?php ?> tag only if the file has a *.php
    extension. Any php code inside *.html or *.htm is ignored.

    Since I dont have admin access to the server or admin person, changing
    the php configuration is out of choice. Now I have to go thru echo
    and print statemnets to get it work. But it looks very cumbersome and
    prone to errors.

    Any other suggestions to simplyfy my struggle?

    TIA

    Sam.
  • Jochen Daum

    #2
    Re: php code embedded inside html page not working.

    Hi Sams,
    On 17 Mar 2004 20:12:52 -0800, sams@freeddns.o rg (sams) wrote:
    [color=blue]
    >How do I make or workaround in my Apache server to parse *.html files
    >for
    ><?php ?> code embedded in it?
    >
    >Currently php recognises <?php ?> tag only if the file has a *.php
    >extension. Any php code inside *.html or *.htm is ignored.
    >
    >Since I dont have admin access to the server or admin person, changing
    >the php configuration is out of choice. Now I have to go thru echo
    >and print statemnets to get it work. But it looks very cumbersome and
    >prone to errors.
    >
    >Any other suggestions to simplyfy my struggle?
    >[/color]
    Why do you not rename the file?

    HTH, Jochen
    --
    Jochen Daum - Cabletalk Group Ltd.
    PHP DB Edit Toolkit -- PHP scripts for building
    database editing interfaces.
    http://sourceforge.net/projects/phpdbedittk/

    Comment

    • sams

      #3
      Re: php code embedded inside html page not working.

      Yes, I renamed the *.htm to *.php and added <?php ?> tags. I thought
      its safe not to reveal the programming language Iam using.
      [color=blue]
      > Why do you not rename the file?
      >
      > HTH, Jochen[/color]

      Comment

      Working...