Hi Marc,
Personally, I never use require().. I've only used require because that
seemed to be the norm in phpMyAdmin.
So, in my thinking, everywhere I wrote require, it should have been an
include (that is just how my brain works).
Anyhow.. I don't fully understand phpMyAdmin because I have not spent the
effort to.
I have stong feelings about the include-require issue. It was so long ago
that I came to a conclusion (that being that I don't use require in my
projects and only use include), that it didn't even occur to me here.
Jeremy
--
Jeremy Brand :: Sr. Software Engineer :: +393485323988 :: jeremy@nirvani.net
http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html for more
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
"LINUX is obsolete" -- Andy Tanenbaum, January 29th, 1992
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Get your own Free, Private email at
http://www.smackdown.com/
On Thu, 26 Jul 2001, the following spilled from the mind of Marc Delisle:
> Date: Thu, 26 Jul 2001 13:19:48 -0400
> From: Marc Delisle
DelislMa@CollegeSherbrooke.qc.ca
> Reply-To: phpmyadmin-devel@lists.sourceforge.net
> To: phpmyadmin-devel@lists.sourceforge.net
> Subject: Re: [Phpmyadmin-devel] header.inc.php3 safty net
>
> Hi Jeremy,
>
> >from the PHP manual:
> --------------------
> require() is not actually a function in PHP; rather, it is a language construct. It is subject to
> some different rules than functions are. For instance, require() is not subject to any containing
> control structures.
>
> Unlike include(), require() will always read in the target file, even if the line it's on never
> executes. If you want to conditionally include a file, use include(). The conditional statement
> won't affect the require(). However, if the line on which the require() occurs is not executed,
> neither will any of the code in the target file be executed.
> -----------------------
>
> If I understand correctly the manual, this code won't work:
>
> if (!defined('__HEADER_INC__'))
> require("./header.inc.php3");
>
> Marc
>
> jeremy brand a �crit :
> >
> > Howdy all.
> >
> > I have defined "__HEADER_INC__" in header.inc.php3 and also made the
> > requires that require header.inc.php3 conditional.
> >
> > Also, a slight programmer note:
> > Anyone adding code to this project should, when requiring header.inc.php3,
> > only do it if !defined('__HEADER_INC___').
> >
> > Jeremy
> >
>
> _______________________________________________
> Phpmyadmin-devel mailing list
> Phpmyadmin-devel@lists.sourceforge.net
>
http://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel
>