« Previous Next »

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

Last post 11-02-2008 3:07 PM by brashquido. 2 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (3 items)

Sort Posts:

  • 10-30-2008, 8:48 AM

    • Mendingo
    • Not Ranked
    • Joined on 10-30-2008, 12:44 PM
    • Posts 2

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

    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?

  • 10-30-2008, 9:06 AM In reply to

    • Mendingo
    • Not Ranked
    • Joined on 10-30-2008, 12:44 PM
    • Posts 2

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

     Aaah. Fixed it!

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

  • 11-02-2008, 3:07 PM In reply to

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

    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
    www.iis-aid.com
    My IIS articles
    My PHP articles
    My How-to guides
Page 1 of 1 (3 items)
Microsoft Communities