Are there any best practices for securely storing file paths in PHP variables?

When storing file paths in PHP variables, it is important to ensure that the paths are securely stored to prevent vulnerabilities such as directory traversal attacks. One best practice is to use a constant to store the file path, as constants cannot be changed during the script execution. Additionally, you can use the `realpath()` function to resolve any symbolic links and ensure the path is normalized.

define('FILE_PATH', '/path/to/secure/directory/');
$secureFilePath = realpath(FILE_PATH);