Re: include_once() then what?
| From: | Ernest E Vogelsinger | Date: | Sun, 04 May 2003 12:14:56 +0000 |
| Subject: | Re: include_once() then what? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-146345@lists.php.net to get a copy of this message | ||
At 14:12 04.05.2003, Ryan A said:
--------------------[snip]--------------------
>I am a bit confused about include_once(), although it is pretty obvious that
>it will include anything only once..
>
>I have been going through the manual and I see the defination/use of
>include_once but one thing the manual does not mention is what happens if
>you accidentally include_once in the same file twice by accident?
>
>on my damn hosting webserver errors are off or I would have tested it myself
>but do any of you guys know?
>Does it throw a warning? error? what?
No. It simply does nothing.
include_once, and require_once, are made just for that - you can safely
include a, say, library file in multiple sources where you need them. If
they're already included, the directive will be simply ignored to avoid
duplicate definitions.
>I think I really should get myself a local server etc installed on my
>machine, I tried phpTriad and was not all that pleased and for some reason
>FoxServ didnt work on my machine so i uninstalled it...anything else thats
>really good out there?
The best idea is to install Apache and PHP. You can do this even on a
notebook running Win98 (shudder). (Just MHO)
--
>O Ernest E. Vogelsinger
(\) ICQ #13394035
^ http://www.vogelsinger.at/