PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
ianhull
Forum Contributor
Posts: 310 Joined: Tue Jun 14, 2005 10:04 am
Location: Hull England UK
Post
by ianhull » Mon Sep 12, 2005 11:06 pm
I am using
but when it displays on the page it shows a number 1 after the include
Why does it do this and how would I get rid of it?
Thaks in advance
John Cartwright
Site Admin
Posts: 11470 Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:
Post
by John Cartwright » Mon Sep 12, 2005 11:30 pm
are you sure your not doing
The reason I say that is include_once will return true upon succesful including.. 1 being true, 0 being false.
other than that the only other thing that could do it is file.php is outputting 1
ianhull
Forum Contributor
Posts: 310 Joined: Tue Jun 14, 2005 10:04 am
Location: Hull England UK
Post
by ianhull » Tue Sep 13, 2005 7:57 am
No I am definatley doing it the way I posted.
I am including a header and a footer.
The header displays the number 1 and the footer does not.
I noticed it a few weeks ago and thought that maybe I had a number 1 on my page but after checking I did not.
Is using include_once different to include?
I need to get rid of this number 1 and if anyone has any suggestions I will be very grateful.
Thanks in advance.
feyd
Neighborhood Spidermoddy
Posts: 31559 Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA
Post
by feyd » Tue Sep 13, 2005 8:12 am
you're emitting it during the script called...
ianhull
Forum Contributor
Posts: 310 Joined: Tue Jun 14, 2005 10:04 am
Location: Hull England UK
Post
by ianhull » Tue Sep 13, 2005 3:46 pm
Thanks for the help guys,
I have now found out what it is.
I was using <? echo include_once("myfile.php");
I did not need to have the echo there.
Thanks