|
| |
|
|
d a v e
Posts: 4136 Joined: 7/24/2002 From: England (but live in Finland now) Status: offline
|
server side includes - 3/16/2008 16:38:25
does anyone know of a good beginners resource for ssi? i'm not sure what server i will be writing for so something that includes methods on finding out what it supports (er, linux/apache... windows...) and then how about doing it. i get the concept behind but i need some a tut on it ;)
_____________________________
David Prescott Gekko web design
|
|
|
|
Tailslide
Posts: 6103 Joined: 5/10/2005 From: Out here on the raggedy edge Status: offline
|
RE: server side includes - 3/16/2008 17:12:52
I haven't found a good single source but here's two: SSIs - http://www.yourhtmlsource.com/sitemanagement/includes.html PHP Includes - http://www.w3schools.com/php/php_includes.asp With SSIs you need to rename pages to .shtml and with PHP includes to .php UNLESS you're sneaky and add in a line into the .htaccess file (in apache) like this: AddType application/x-httpd-php .htm .html .shtml Then you can keep the .html suffix. I've used SSIs on Windows servers but I don't know if there's a clever way around the whole filename thing so I stuck with .shtml in that case. You can check what server a site is on by using FF web developer toolbar. PHP is enabled on many Windows servers too these days so if in doubt just chuck up a php info page to see if it works ( put <?php phpinfo() ?> in a page called info.php and upload it - see if you can view it).
_____________________________
"My strategy is so simple an idiot could have devised it" Little Blue Plane Web Design | Blood, Sweat & Rust - A Land Rover restoration project
|
|
|
|
Mane
Posts: 105 Joined: 7/7/2005 Status: offline
|
RE: server side includes - 3/16/2008 17:28:40
Adding a line like that to .htaccess makes the server parse every single page for PHP (or SSI). Not sure how noticeable the performance difference really is, but it's a good idea to do that only if most of the files actually use PHP.
|
|
|
|
Tailslide
Posts: 6103 Joined: 5/10/2005 From: Out here on the raggedy edge Status: offline
|
RE: server side includes - 3/16/2008 17:44:47
Yeah it'd be a problem with a really huge site - but on most normal sites shouldn't make a big difference. If you're going to use SSIs then the assumption would be that you'd use them on every page for all the common bits. Oh I forgot to say - Dave, you use DW don't you? For god's sake don't do the .htaccess thing if you still use FP or want FP extensions to work any time in the future as it will jump up and down on them until they're a nasty mess.
_____________________________
"My strategy is so simple an idiot could have devised it" Little Blue Plane Web Design | Blood, Sweat & Rust - A Land Rover restoration project
|
|
|
|
d a v e
Posts: 4136 Joined: 7/24/2002 From: England (but live in Finland now) Status: offline
|
RE: server side includes - 3/16/2008 17:48:56
i use DW but i'm coding site for FP editors but NOT using any FP extensions. i'll probably just stick with the .shtml / .php thing ;)
_____________________________
David Prescott Gekko web design
|
|
|
|
coreybryant
Posts: 2453 Joined: 3/17/2002 From: Castle Rock CO USA Status: offline
|
RE: server side includes - 3/18/2008 15:20:30
Last week I was working on a blog for this actually. And then another forum that I just moderate on - I became one of the Administrators and had to help fixed some major problems. So in the meantime, I did attempt to get something up at File Includes. I did do a couple of files that can be downloaded. I think they are correct - I did check them at one time - but they are pretty basic.
_____________________________
Corey R. Bryant Merchant Accounts | Toll Free Numbers | Expression Web Blog
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|