So I'm using PHP's auto_prepend_file
to load a config file I use. I tried doing it from php.ini but the file was never loaded. After some ... hours, I used .htaccess and voila, it works!
I'm using my own machine on windows 7 with wamp installed. The app is found under D:wampwwwmyawesomeapp
the global file (called config.php) is found at the root directory (I have some folders in there).
auto_prepend_file = "D:wampwwwmyawesomeappconfig.php"
did not work, however, adding php_value auto_prepend_file D:/wamp/www/myawesomeapp/config.php
works perfectly fine.
Why? Shouldn't the config from php.ini just works? I also investigated include_path and added the app's folder just in case but still did not work.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…