By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,723 Members | 1,876 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,723 IT Pros & Developers. It's quick & easy.

include File Help Needed

P: n/a
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...

Jul 16 '05 #1
Share this Question
Share on Google+
2 Replies


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

--
Chris Mosser
Jul 16 '05 #2

P: n/a
> It made no difference - the actual include file didn't have the php
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??


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

Jul 16 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.