Re: header() and require()

From: Date: Mon, 26 Feb 2001 17:36:04 +0000
Subject: Re: header() and require()
Groups: php.general 
Request: Send a blank email to php-general+get-41712@lists.php.net to get a copy of this message
Addressed to: "Jason Jacobs" <jason@factory7.com> php-general@lists.php.net ** Reply to note from "Jason Jacobs" <jason@factory7.com> Mon, 26 Feb 2001 11:28:37 -0500 > > Hi. In some of my files, I have a require statement to get some global > stuff accessable. I also have some header() redirects. They don't work > (they worked before I added the requires). I moved the require under one of > the header()s and that one works now, but I can't move it under the other > one because stuff has to happen before the redirect and it needs the > required stuff. So my question is do require statements produce output that > I can't see (which would make the redirects not work)? The files I'm > requiring don't have any output, which is why I'm confused. Thanks. The most common cause of this problem is a blank line, or evan a space in the wrong place in one of the required files. The following examples will cause the problem: -------------------------------------- <? some code here ?> -------------------------------------- -------------------------------------- <? some code here ?> -------------------------------------- -------------------------------------- <? some code here ?> -------------------------------------- -------------------------------------- <? some code here ?> NOTE: even a single space after the > will cause a problem. -------------------------------------- -------------------------------------- <? some code ?> <? some more code ?> -------------------------------------- What they all have in common, is ANYTHING outside of <? and ?> in the file. Rick Widmer Internet Marketing Specialists http://www.developersdesk.com

« previous php.general (#41712) next »