Forum Moderators: phranque

Message Too Old, No Replies

Auto Including/Appending

Adding a piece of code across the site

         

oziman

8:25 am on Oct 15, 2007 (gmt 0)

10+ Year Member



Hi all,

There's a directive/way (I think in mod_rewrite, I could be wrong) to take a given file, say foo.php, and have it be appended as the first thing to every file on a server, no?

I thought I saw it here once but I searched and couldn't find it, so any help would be most appreciated.

cheers.

jdMorgan

1:51 pm on Oct 15, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Using PHP auto_prepend [google.com] is one way. You might also use server-side includes (SSI) for a non-PHP-dependent solution, although you have to pick one or the other -- you can't easily mix PHP and SSI.

Jim