Reputation: 1629
I'm working in a GoDaddy shared hosting environment (Linux, PHP 7.1). I want to automatically prepend a file, globally, but I can't seem to get it working with an .htaccess or php.ini file.
I've tried variations on the following to no avail:
include_path = ".:/home/username/public_html"
auto_prepend_file = "./includes/autoload.php"
php_value include_path ".:/home/username/public_html"
php_value auto_prepend_file "./includes/autoload.php"
What am I doing wrong?
Upvotes: 2
Views: 1187
Reputation: 1629
I was able to get this working by using a .user.ini file:
Since PHP 5.3.0, PHP includes support for configuration INI files on a per-directory basis.
I also found this documentation from GoDaddy useful.
Upvotes: 2