Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Having PHP site point to a different path than one that is in the code

I am running a PHP site on Windows using Wampserver. All throughout the site there is a hardcoded line such as:

$settings = parse_ini_file("/usr/local/apache2/myconfigs/settings.ini", true);

I know this is bad practice to begin with but it is out of my control.

When the site runs is there any possible way I can trick the site to point to C:\wamp64\bin\apache\apache2.4.27\myconfigs\settings.ini whenever the code is looking for /usr/local/apache2/myconfigs/settings.ini in the parse_ini_file function?

like image 274
Blake Rivell Avatar asked Feb 27 '18 15:02

Blake Rivell


1 Answers

$settings = parse_ini_file(APACHE_INI_PATH, true);
// $settings = parse_ini_file("/usr/local/apache2/myconfigs/settings.ini", true);
like image 132
cddoma Avatar answered Oct 27 '22 11:10

cddoma