php and ssi together

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • shen_kid
    Confirmed User
    • Aug 2001
    • 199

    #1

    php and ssi together

    how can i excute some php codes in a document with a .shtml extension?

    i tried to do this in my index.shtml page,
    PHP Code:
    <!--#include virtual="/includes/showinc.php" --> 
    
    and

    PHP Code:
    <!--#include file="includes/showinc.php" --> 
    
    but my index.shtml just shows the source of showinc.php. it's not executed.

    the strange thing is that i have this
    PHP Code:
    <!--#include virtual="in.php" --> 
    
    near </head>, and it executes.

    do shtml files only allow you to do
    <!--#include virtual="whatever" --> only once?
  • NightCaster
    Registered User
    • Aug 2002
    • 90

    #2
    do shtml files only allow you to do
    As far as I know, you can only use SSI commands on .SHTML files.

    I am no pro programmer so don't blame me if I'm wrong

    Comment

    • Nbritte
      Confirmed User
      • Sep 2001
      • 689

      #3
      &lt!--#include virtual="/includes/showinc.php" -->

      should work
      or try
      &lt!--#include file="/includes/showinc.php" -->
      you can also make the server parse html and htm documents
      by adding this to an htaccess file
      AddHandler server-parsed .html
      AddHandler server-parsed .htm

      SexyCityCash gets in Bed with PornoDan

      Comment

      • dodo
        Confirmed User
        • Jan 2002
        • 162

        #4
        try the using 'exec' in php

        _
        FREE TRAFFIC TRADING on any host. Also try our 200% traffic back program.Click here
        We host the scripts for you so you trade on our bandwidth.

        Comment

        • shen_kid
          Confirmed User
          • Aug 2001
          • 199

          #5
          like how?

          Comment

          • dodo
            Confirmed User
            • Jan 2002
            • 162

            #6
            e.g

            exec("someperlscript.pl parameters >/dev/null &");

            _
            FREE TRAFFIC TRADING on any host. Also try our 200% traffic back program.Click here
            We host the scripts for you so you trade on our bandwidth.

            Comment

            Working...