You might need ./includes instead of includes, but it depends on where you put your banner files. The other thing I mentioned is that if you put a '@' before statement it will cause errors to be ignored, so that if there's a thread without a banner, it won't cause an error (maybe that's not a problem if you are going to guarantee that every thread has a corresponding file). So, maybe this:
Code:
ob_start();
@include("./includes/$pagenumber.php");
$includedphp = ob_get_contents();
ob_end_clean();