Move up on folder from absolute path
directory, move, php
Solution
you could try:
require_once(realpath(__DIR__ . '/../config.php'));
Not tested but in theory it is supposed to work.
Problem
How do I accomplish to move up one folder from absolute path? File structure: ``` /folder/ /folder/config.php /folder/classes/test.php ``` From test.php I want to include_once or require_once the config.php -file. I've tried this in test.php, but it doesn't work: ``` require_once(dirname(__FILE__) . '/../config.php'); ``` Error message: *PHP Fatal error: require_once(): Failed opening required '/loooong-path/classes/../test.php'*