Results 1 to 5 of 5
  1. #1
    Join Date
    Mar 2004
    Location
    Tulsa Oklahoma
    Posts
    55

    PHP & .shtml tags on .html page

    I understand that with in .htaccess file by using AddType application/x-httpd-php .htm .html I can display php tags on .html page, and by using AddType text/x-server-parsed-html .htm .html I can use .shtml tags in .html page.

    However I failied when I tried to use both to use both .shtml and php tags in a .html page.

    Does anyone know how can I make below code work on the same page. (shtml and php tag) (does not matter if the working page has .html or .shtml extension)

    Code:
    SHTML Date : 
    <!--#echo var="DATE_LOCAL"--> 
    <br><hr><br>
    
    PHP Date : 
    <?php echo date("D M j G:i:s Y"); ?>
    <hr>
    <br>
    Thank you for the help.
    ................

  2. #2
    Join Date
    Jul 2005
    Location
    Atlanta, GA
    Posts
    13

    use an output filter

    Hey Ashley,

    You can do this with apache 2.0 and later. Not sure about earlier versions.
    Add this line to your .htaccess file:

    Code:
    AddOutputFilter PHP;INCLUDES ext
    (where ext is the file extension you want to use)

    Out of curiosity, why would you want to do this?

    <<Signature to be setup in your profile>>
    Last edited by anon-e-mouse; 10-25-2006 at 09:59 PM.

  3. #3
    Join Date
    Mar 2004
    Location
    Tulsa Oklahoma
    Posts
    55
    Our is using 1.x version of apache, so above solution might not help

    Just working on something and thought this might be a helpful.
    ................

  4. #4
    Join Date
    Jul 2005
    Location
    Atlanta, GA
    Posts
    13
    You could always get a new host.
    -Michal Wallace
    cornerhost.com

  5. #5
    Join Date
    Mar 2004
    Location
    Tulsa Oklahoma
    Posts
    55
    Thank you for the help.


    P.S. We are pretty happy with our current host, don't see a reason to change.
    ................

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •