include File Help Needed

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Ralph Freshour

    include File Help Needed

    When I use the include statement and include a file, it prints on the
    web page - these are functions that I call deeper into my web page -
    there must be a setting that is causing the functions to be displayed
    on the web page???

    Thanks...

  • Chris Mosser

    #2
    Re: include File Help Needed

    does the included page have beginning and ending php tags...that was a
    problem I came across

    --
    Chris Mosser


    Comment

    • MeerKat

      #3
      Re: include File Help Needed

      > It made no difference - the actual include file didn't have the php[color=blue]
      > tags but the include statement itself was inside php tags of the
      > script that contained it - I added the php tags anyway inside the
      > include file too but it didn't make any difference - any other
      > thoughts??[/color]

      file1.php
      ---------
      <?
      include('file2. php');
      ?>

      file2.php
      ---------
      <?
      print "this is file 2";
      ?>

      If, when viewing file1.php, you see:

      <?
      print "this is file 2";
      ?>

      rather than:

      this is file 2

      then file2.php is not being parsed by the server. I would make
      completely sure that file2.php really does have the php tags. Really sure :)

      MK

      Comment

      Working...