PHP With IIS 6: include or require both show file's source code.RSS

2 replies

Last post Nov 02, 2008 03:07 PM by brashquido

  • PHP With IIS 6: include or require both show file's source code.

    Oct 30, 2008 08:48 AM|Mendingo|LINK

    Can anyone help me with this?

    I've just set up PHP on IIS 6. It works fine, phpinfo() shows the correct info. However, when I use an include file:

    include("functions.php");

    The entre source code of functions.php is outputted to the browser, rather than being run by the php interpreter. Has anyone had this problem or know why it might be happening?

    PHP IIS6 PHP install

  • Re: PHP With IIS 6: include or require both show file's source code.

    Oct 30, 2008 09:06 AM|Mendingo|LINK

     Aaah. Fixed it!

     I was using <? rather than <?php in the functions.php file, and this particular implementation didn't allow that.

  • Re: PHP With IIS 6: include or require both show file's source code.

    Nov 02, 2008 03:07 PM|brashquido|LINK

    That one catches a few people. To be able to use the short tags directive in your php.ini file is set to on (the default is off).

    ----------------
    Dominic Ryan
    Microsoft IIS MVP
    IIS Aid
    IIS and Open Source