PHP how to autoinclude? -


i have following project structure:

\ |- foldera |  |- folderb |  |  |- index.php |  |- index.php |- index.php |- config.php 

i want config.php loaded automatically (without 'include' directive inside index.php) whenever access:

http:://mysitename/index.php http:://mysitename/foldera/index.php http:://mysitename/foldera/folderb/index.php 

or other php file in project.

how can achieve that?

the way make works use auto_prepend_file php.ini directive:

auto_prepend_file = /path/to/config.php 

or in .htaccess:

php_value auto_prepend_file config.php 

Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -