Can we use SSI's in PHP scripts?
thank you
| SitePoint Sponsor |
Can we use SSI's in PHP scripts?
thank you





use this:
<?php
include("file.inc");
?>
www.nyanko.ws - My web-, software- and game development company.
www.mayaposch.com - My personal site and blog.



be careful using plain "*.inc" because some webservers don't parse this info and anyone can see the actual script when they enter the scripts location.
mine was a connection include file for my database and when I entered the url to it's location i could see the password.
in other words you can also use php3.
sam





Sam: you're totally right. For sensitive files (i.e. with passwords etc.) I use the extension .php (or .php3 as you suggested) so that the script in the include file will be parsed.
Golden tip: Don't forget to put <?php ?> around the script in include files, else they won't get parsed! (thanks, Karl)
www.nyanko.ws - My web-, software- and game development company.
www.mayaposch.com - My personal site and blog.
Bookmarks