NYCPHP Meetup

NYPHP.org

[nycphp-talk] php include file question

Tracy tech_learner at yahoo.com
Mon Apr 7 00:37:40 EDT 2003


Yes, if i remember right i read that all of include(x) 's and require(x) 's treat the x's as HTML and so u have to <? ... ?> to get php into action 
Tracy
 "Hise, Jeremy" <jhise at nextsource.com> wrote:I just performed this test.

1) Created a file called inctest.php
2) Contents of inctest.php

include("./myinc.php");
?>

3) Created file called myinc.php
4) Contents of myinc.php (note there are no )

print("Hello");

5) Loaded up file inctest.php in browser
6) Output is:

print("Hello");

So it seems to me that you MUST put the PHP code in the INCLUDED file IN and ?> in order for it to be parsed. It doesn't matter that you are
including it from withing PHP and it doesn't matter that it ends with .php.
It will not be parsed if it is not in .

This test was run on RH 7.3 with PHP 4.3.0-dev with Apache 1.3.22



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Coming together is a beginning... 
   keeping together is progress... 
      working together is success !!!
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


---------------------------------
Do you Yahoo!?
Yahoo! Tax Center - File online, calculators, forms, and more
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20030406/b4dbe34e/attachment.html>


More information about the talk mailing list