Search code examples
phphome-directory

How is it possible to select a file in the home directory?


In php how would I select a header file from a page that isn't in the home directory?


Solution

  • require_once('../header.php');
    

    would include the header.php file from the parent directory. Use either relative or absolute paths for the require function.