Page 1 of 1

Why and how to get rid?

Posted: Mon Sep 12, 2005 11:06 pm
by ianhull
I am using

Code: Select all

include_once("myfile.php");
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

Posted: Mon Sep 12, 2005 11:30 pm
by John Cartwright
are you sure your not doing

Code: Select all

echo include_once('file.php');
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

Posted: Tue Sep 13, 2005 7:57 am
by ianhull
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.

Posted: Tue Sep 13, 2005 8:12 am
by feyd
you're emitting it during the script called... :?

Posted: Tue Sep 13, 2005 3:46 pm
by ianhull
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