I have an apache2 server, it has a vast and growing folder structure.
There is a set of instructions I would like to be executed at the beginning of every page in that website.
How do I implement that without pasting those very lines at the beginning of every file in the website?
- I don’t want to have the code at the beginning of every file.
- I have tried changing the
auto_prepend_filein php.ini to:
auto_prepend_file = ~/website_preview/say_hello.php
‘say_hello’ is a hello-world php script, but the script does still not get executed at all.
Wrong
php.inifile, correct location is/etc/php5/apache2/php.ini