PHP recursive directory

0

I need to include a file from a recursive directory, I'm using the following form:

<?php 
  require_once '../../cabecalho.php';
?>

Okay, what's happening is this. The header, which would be the header of the page + menu is loading, however, only the HTML, everything that is referenced inside the header, for example:

<link href="css/materialize.css" type="text/css" rel="stylesheet" media="screen,projection"/> 

Is not loading, help?

    
asked by anonymous 28.04.2016 / 01:36

1 answer

0

To work that way, the path of the css, javascript or image should be relative to the page that is including the header and not the header itself.

Alternatively, you can use the absolute path to include the files, for example:

<link href="http://seuservidor.com/css/materialize.css" type="text/css" rel="stylesheet" media="screen,projection"/> 
    
28.04.2016 / 23:33