This topic is locked

Move the database configuration file

11/11/2026 04:40:33
PHPRunner General questions
S
Svic srl author

Hi,
Is it possible to move the database configuration file outside the htdocs folder, for better security?
If it's possibile where I've to insert the new path?
Thank you

Sergey Kornilov admin 11/11/2026

Check this:
https://asprunner.com/forums/topic/25838-how-to-load-database-connection-info-from-external-file

And it can be located outside of htdocs folder if required. It can be something like this.

include '../../outside_folder/config.php';

S
Svic srl author 11/12/2026

Ok, I'll try.
Thank you