[Phpmyadmin-devel] require_once

Alexander M. Turek alexander.turek at stud.uni-karlsruhe.de
Thu Dec 4 14:02:05 CET 2003


Hi list,

Garvin Hicking wrote:
>
> > As we dropped PHP 3 support, we might also want to start use
> > require_once to get rid of bug #571409. Does any of you
> > know something that will need special care or just replacing
> > every require with require_once should be okay?
>
> I'm not absolutely sure we can do that. I think I remember some place
> where require() is used in an iterative way, which will break
> functionality when using require_once.

I think I've been careful enough. So far, the latest CVS files work fine for
me... :-)

>
> But replacing require with require_once on places where a file should
> only be required once is no problem and will impose no problems.
>

That's what I did.

I replaced all include / require calls by require_once. If a file may be
required multiple times, I used require instead.
In cases where we cathed a failed inclusion, I used include_once / include
instead. This is the case for the configuration files, for instance.

Regards,

--

Alexander M. Turek
<rabus at users.sourceforge.net>
       _           __  __          _       _           _
 _ __ | |__  _ __ |  \/  |_   _   / \   __| |_ __ ___ (_)_ __
| '_ \| '_ \| '_ \| |\/| | | | | / _ \ / _` | '_ ` _ \| | '_ \
| |_) | | | | |_) | |  | | |_| |/ ___ \ (_| | | | | | | | | | |
| .__/|_| |_| .__/|_|  |_|\__, /_/   \_\__,_|_| |_| |_|_|_| |_|
|_|         |_|           |___/
                                    <http://www.phpmyadmin.net>






More information about the Developers mailing list