I am trying to include the config.php file that is in the root folder of the site. However, I also have the header.php file in the root of the site and all pages are in a folder with this name, so the file looks like this.
<?php
include('../config.php');
include('../header.php'); ?>
conteudo...
</?php include('../footer.php);
For absolute link already tried:
include("http://".$_SERVER['SERVER_NAME']."/config.php");
Error displayed on online server:
I did not succeed either. Warning : include (../config.php): failed to open stream: No such file or directory in /home/u655246247/public_html/paginas/artigos.php on line 2
Line 2: that's exactly where I want to go - > include ('../ config.php'); .