Topic awaiting preservation: SSI questions |
|
---|---|
Author | Thread |
Nervous Wreck (II) Inmate From: 1393 |
posted 12-04-2004 08:27
Hi, just a couple silly questions if you've got the time. I was just wondering what the differnce is between <?php include("page.php"); ?> and <?php require("page.php"); ?>. Also, when using an include is it OK to put it anywhere on the page? For example, I want to use an include to define the <link> tag... So on all my pages I'll have something like <?php include("styleSheet.php"); ?> just below the <title> tags and then styleSheet.php would have one line <link href="style.css" rel="stylesheet" type="text/css">. That way I can build multiple layouts and then change them out when I want to (as opposed to user selection). Thanks! |
Paranoid (IV) Inmate From: PA, US |
posted 12-04-2004 09:16
You're on the wrong board err forum!! quote:
|
Nervous Wreck (II) Inmate From: 1393 |
posted 12-04-2004 09:21
Thanks Ramasax! |
Paranoid (IV) Mad Scientist with Finglongers From: Germany |
posted 12-04-2004 11:44
though a lot of includes are going to be slow - the server has to locate each and every file every time. |
Paranoid (IV) Inmate From: Maryland, USA |
posted 12-05-2004 20:55
A better idea would be to define a function that outputs the segment you want to display when you include that section. Then you only need one require_once or require function. |
Nervous Wreck (II) Inmate From: 1393 |
posted 12-10-2004 04:17
^^ a php function? |
Paranoid (IV) Inmate From: Maryland, USA |
posted 12-11-2004 05:01
Yes. |
Maniac (V) Mad Scientist From: :morF |
posted 12-11-2004 12:06
well, considering that the title of this thread is SSI questions, should it not be changed; it is, after all, about PHP, not SSI... |
Bipolar (III) Inmate From: 1393 |
posted 12-11-2004 17:20
Hebedee, mind giving me an example? Skaarjj, I thought SSI was "Server Side Include" for whatever you're using to control the include. Is "SSI" generic to only one language? |
Maniac (V) Inmate From: Boston, MA, USA |
posted 12-11-2004 22:12
SSI does in fact stand for Server Side Include. |
Maniac (V) Inmate From: under the bed |
posted 12-12-2004 00:31
I don't know anything about the technicalities involved....but, "SSI", from my understanding is a specific reference to Apache's "Server Side Includes", BUT, the generic phrase 'server side includes' is still very appropriate in this case - it is a server side language being used for the purpose of includes...it's just not specifically "SSI". |