Re: Question about include_once and require_once
| From: | Al | Date: | Thu, 01 May 2003 14:06:28 +0000 |
| Subject: | Re: Question about include_once and require_once | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-145961@lists.php.net to get a copy of this message | ||
It is working for me now also. I had tried it with Moz 1.3 and IE6, neither worked before.
I've had this type of problem recently. Could be my DNS server, on comcast, is screwing up.
Gavin Nouwens wrote:
Works fine from .au -gav. | -----Original Message----- | From: Al [mailto:news@ridersite.org] | Sent: Friday, 2 May 2003 12:00 AM | To: php-general@lists.php.net | Subject: Re: [PHP] Question about include_once and require_once | | | FYI: | | I just tried your link to | | http://www.phparch.com/ and it didn't work. | | | | John W. Holmes wrote: | | >>The php lit is not clear, to me, exactly what is happening. | >> | >>Does the "once" refer to the session or to the page?| >> | >>| > | >Page. It has nothing to do with sessions. So if you have | >include_once('functions.php') in your code twice, the 'functions.php' | >code will only be parsed once with the first include_once() call. | > | > | > | >>In other words: suppose I have a file with several functions and| >> | >>| >several | > | > | >>pages on my site. My visitors can arrive at any page and then| >> | >>| >navigate | > | > | >>around the site. If I use include_once () on all my php pages, can I | >>rely on the session manager to maintain the functions for the| >> | >>| >visitors? | > | >No. Not sure where you got this from, but sessions are a completely | >different topic. | > | > | > | >>If I use just plain "include ()", does the php parser load up an | >>additional copy for every time it's called?| >> | >>| > | >It will parse the include file each time include() is called. | > | >---John W. Holmes... | > | >PHP Architect - A monthly magazine for PHP Professionals. | Get your copy | >today. http://www.phparch.com/ | > | > | > | > |