If you manage your own web site or manage it for others and have been using SSI for the longest time, I challenge you to try PHP. It’s a lot more flexible and powerful than SSI. Here are some examples how.
With SSI – all your included files needs to be on the same server (or domain) while if you used PHP, you can pull files from any server and any domain (provided you have the right to republish of course)
PHP allows you to embed content within content. For example, if you have say header.html as the included file and inside the header.html you want to include another file e.g. external.html. You can’t do that with SSI.
SSI is an apache server feature which means if you run a Windows server, depending how your host setup the server, chances are this won’t work. PHP works on almost any platform as long as your host has PHP installed. So moving across different platforms is much easier.
You can get creative with PHP without resorting to Javascripts e.g. Monday display this file, Tuesday another and so on. Once you switch, you can also add a whole bunch of content like RSS content for example, a lot easier.
Using PHP is really not as difficult as people think. In fact, the code used is a lot like SSI. In SSI, you’d put something like
In PHP, you’d use
< ? include("myfile.htm") ?>
Give it a try.
Technorati Tags: internet, coding, technology, web development