.htaccess php_value auto_prepend_file help

Can someone tell me what this line does in the .htaccess file?

php_value auto_prepend_file application.php

Hi Goofy!

The structure of that code tells me that it’s located in an .htaccess file but is used to alter the php.ini configuration for the request. In other words, php_value is used in the Apache environment to alter the PHP configuration with the PHP configuration next followed by the value (argument).

auto-prepend-file is the PHP directive to include the named file BEFORE the file requested. It’s useful if you’re a host and want to put a client’s page within a frame or to enforce a login before providing access to a script, etc. It’s a very useful tool!

Obviously, application.php is the value of the auto_prepend_file to be used but you should make this an (internal) absolute path (if not already in the PHP include_path).

Regards,

DK

Thanks for your help David.

So there should be a file called application.php in the folder structure of the site?

:lol::lol::lol:

Yes, but only if you want to prepend it!

Regards,

DK