I want to automatically include one php file in all my webpages. This is for tracking purpose and must be included before any header information is sent.
The problem is I have 1200 pages and it would be not efficient to edit and put the "include" command in every webpage. Is there a way to do an inculde from a server end before a php file is called?
As it is an .htaccess solution, your server needs to be running Apache (as opposed to IIS, etc.).
xalex
7:21 pm on Aug 3, 2005 (gmt 0)
If I use .htaccess in my root folder of the web, will it work for subfolders?
ergophobe
8:44 pm on Aug 3, 2005 (gmt 0)
It should. The normal way that .htaccess works is to affect all files and directories below it unless overridden by something further down the tree (er.... up the tree actually I guess).