So I have a site that uses subfolders for each subpage, however I can't get every directory to work.
the fotter.php is called in correctly, however not the head.php. What is wrong?
php-file:
<?php include_once("analyticstracking.php") ?>
<?php include('../head.php'); ?>
<?php include('header.php'); ?>
<?php include('counters.php'); ?>
<?php include('quiz.php'); ?>
<?php include('../goal.php'); ?>
<?php include('../footer.php'); ?>
You should include proper path. Try:
<?php include('/home/username/public_html/directory/head.php); ?>
Check if the head.php
file has read
permissions set for the user your webserver is running as (i.e., not you.) Depending on the operating system and web server there are many possibilities but the easiest would be probably to make it readable for all:
chmod 0644 head.php
;