CSS does not load with $ _SESSION

-1

I load the CSS like this:

<link href="../css/style.css" rel="stylesheet">

But I would like to pass a different reference, something like:

 <link href="<?php echo $_SESSION['caminho_completo']."css/style.css"?>" rel="stylesheet">

But when I do this CSS does not load on the page, what solution would it take? obs: it works in home.php which is inside the folder pages but does not work for the files that are inside the folder 1998.

    
asked by anonymous 17.01.2018 / 14:36

1 answer

0

I think you have a config file in your project, if you do not have the suggestion to create one, in it you can define variables and constants to use in your project, for example:

config.php

define('_LINK_BASE_', "http://exemplo.com.br");

index.php

<?php include_once('config.php'); ?>
<html>
    <head>
        <link href="<?php echo _LINK_BASE_; ?>/css/style.css" rel="stylesheet">
    </head>
</html>
    
17.01.2018 / 14:51