Forum Moderators: coopster
we have too many pages indexed in the SEs to start mucking around with a new URL system, so i am going to keep the same URLs.
originally i wanted to strip all of my html pages, leaving just the content, and then to include a header and footer file.
however, i really like the idea of keeping all the page design elements together, so that this design can be changed with minimum of fuss by non-programmers. this would mean using a template
<html>
<head>
<title><?=$title?></title>
</head>
<body>
<div><?=$navbar?></div>
<div><?=$content?></div>
<div><?=$sidebar?></div>
</body>
</html>
which i would then include() at the bottom of each of my html pages, and then echo out the appropriate $variables which i had defined in the page above the include.
the problem is, some of the $variables would hold a large ammount of information. e.g. $content could be 8 long paragraphs of text.
i have read that variables are stored in ram, so if i start storing too many large variables in ram, would i start running out of ram and would the page creation of my site start slowing down?
should i unset() all these variables directly underneath where i include the template? or is that not necessary?
hope this is understandable ;-)
many thanks!
When someone tells you about large variables, they're talking about variables that contain at least a few megs of information.
Just a few paragraphs wont put a strain on your server at all!
Unless those few paragraphs contain a few megs of information... but if that were the case, I'd definitely do some editing :P
And no... unsetting variables is unnecessary. PHP unsets the variables after the PHP file has completely loaded and executed.
-panic