I wrote the website in HTML, but then I wanted the header and part of the navigator to be in the same file, so I just needed to change it once. I changed all the pages to .php and added php. However, now I get an error on the pages that I put in folders, so I could create messy links.
Header file: /test/assets/header.php
Works: /test/index.php contains <?php include 'assets/header.php'; ?> <?php include 'assets/header.php'; ?>
Throws an error: /test/company/index.php contains <?php include '/test/assets/header.php'; ?> <?php include '/test/assets/header.php'; ?>
Error:
Warning: include(/test/assets/header.php) [function.include]: failed to open stream: No such file or directory Warning: include() [function.include]: Failed opening '/test/assets/header.php' for inclusion (include_path='.:/usr/local/lib/php:/usr/local/php5/lib/pear')
I am having a problem with a header file located in a folder in the root folder. I believe this is a simple problem, just not knowing how to enter the URL. If I try to include the full path to header.php, I get a URL file-access is disabled error URL file-access is disabled
source share