tags:

views:

155

answers:

1

On a LAMP stack I was able to use:

> php_value auto_prepend_file bootstrap.php

in .htaccess to bootstrap a bunch of commands that I wanted to execute before any page was ever processed.

Is it possible to do the same in IIS 6.0 ?

UPDATE: Not the prettiest solution, but since I have one site on this server I just added the auto_prepend_file setting in php.ini and restarted IIS

+1  A: 

You can either use the registry to set a per-directory configuration. Or .user.ini files (since php 5.3) :

Since PHP 5.3.0, PHP includes support for .htaccess-style INI files on a per-directory basis. These files are processed only by the CGI/FastCGI SAPI. This functionality obsoletes the PECL htscanner extension. If you are using Apache, use .htaccess files for the same effect.
VolkerK