IIS6 - php-source

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Brian \bojo\ Jones

    IIS6 - php-source

    Is it possible to make IIS6 render .phps files as php-source? I haven't
    been able to locate any information on this, and am beginning to believe
    it's not possible.


    -- Brian 'bojo' Jones
  • NC

    #2
    Re: IIS6 - php-source

    Brian "bojo" Jones wrote:[color=blue]
    >
    > Is it possible to make IIS6 render .phps files as php-source?[/color]

    I don't think so. Moreover, even Apache does this only when
    PHP is installed as an Aoache module.

    This said, look into highlight_file( ) and highlight_strin g():




    Cheers,
    NC

    Comment

    • Brian \bojo\ Jones

      #3
      Re: IIS6 - php-source

      NC wrote:
      [color=blue]
      > Brian "bojo" Jones wrote:
      >[color=green]
      >>Is it possible to make IIS6 render .phps files as php-source?[/color]
      >
      >
      > I don't think so. Moreover, even Apache does this only when
      > PHP is installed as an Aoache module.
      >
      > This said, look into highlight_file( ) and highlight_strin g():
      >
      > http://www.php.net/highlight_file
      > http://www.php.net/highlight_string
      >
      > Cheers,
      > NC
      >[/color]

      Wonderful, that is exactly what I was digging around for. Thank you
      very much.

      -- Brian

      Comment

      • DH

        #4
        Re: IIS6 - php-source

        Brian "bojo" Jones wrote:[color=blue]
        > Is it possible to make IIS6 render .phps files as php-source? I haven't
        > been able to locate any information on this, and am beginning to believe
        > it's not possible.
        >
        >
        > -- Brian 'bojo' Jones[/color]

        Consider writing a "hiliter.ph p" script to which you can pass filenames
        to via an A HREF tag from a dirctory listing:
        <a href="hiliter.p hp?f=filename.p hp">hiliter</a>

        hiliter.php might contain something like:

        $f = array_key_exist s('f', $_GET)
        ? strip_tags(stri pslashes(trim($ _GET['f'])))
        : '';

        if(!empty($f)){

        if(file_exists( $f)){

        $string = file_get_conten ts($f);

        highlight_strin g($string);

        }else{

        echo '<p>unable to locate '.$f.'</p>';

        }

        }elseif(empty($ f)){

        echo "\n".'<p>Filena me is empty</p>';

        }

        Comment

        Working...