Website security

From IT Wiki
Jump to navigation Jump to search
See also: Hardening WordPress

PCI compliance

Security include - require_once

For applications to run they require access to the database. Information such as the database user's name and password are usually placed in a configuration file. Instead of placing it in a configuration file in the public_html folder, or one of its subfolders, you can place it in a file higher up in the chain (closer to the root), which should protect it from public access in case the public folder becomes exposed.

Placing it in bar.php, you can access it by placing the following code in the configuration file:

require_once "../../foo/bar.php";