Re: Include and memory

From: Date: Mon, 03 Jun 2002 17:33:52 +0000
Subject: Re: Include and memory
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-100439@lists.php.net to get a copy of this message
On Mon, Jun 03, 2002 at 01:49:03PM -0300, Paulo Cesar wrote: > I'd like to know if the include function alocates the variables that are in the included file in the memory... and, if it happens, if do I have a way to access a file with some variables without alocating it in memory. Dude, turn line wrapping on in your email program. Taking the following two bits of information into account should answer your question: 1) Variables are put into memory when your code executes the line that assigns the variable. 2) Stuff in an include file is just like having the included code inside your script. So, if you don't want everything going into memory, add some conditional statements (like "if" or "switch"), that'll put the stuff into memory only when you want it to be in memory. --Dan -- PHP classes that make web design easier SQL Solution | Layout Solution | Form Solution sqlsolution.info | layoutsolution.info | formsolution.info T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y 4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409

« previous php.general (#100439) next »