PDA

View Full Version : Add second php include group or for certain pages??


GeorgeofCS
05-13-2002, 11:21 PM
Ok I'm wondering if it's possible to create a secondary php includes template or a way to get a php file to only work on a couple of pages. I just need a php to be included on a few pages of the site and it screws up if it's added in wrong spots :(

Admin
05-14-2002, 08:45 AM
In your phpinclude template put something like this:
if (substr($PHP_SELF, -strlen('filename.php')) == 'filename.php') {
// Do your stuff
}

Logician
05-14-2002, 09:19 AM
I think this is a very nice tip and a lot of good hack can be structured around this hint..May I suggest publishing it in Hacking Hints Board?

Admin
05-14-2002, 09:25 AM
Ask and ye shall receive. :)