lundi 27 avril 2020

PHP: Absolute Links in require statements without losing variables

creating a new website, i wanted to exclude the header to a php include file. As the html files are in subfolders, i cant use a relative link. So I tried to use an absolute link Bsp: require "https://www.myside.com/inc/header.inc.php";

However I lose the variables set before using that method. What is weird, because as i know require just takes the text from a file and pasts it to the position it is called.

Do you have any idea to fix this?

Kind regards Daniel




Aucun commentaire:

Enregistrer un commentaire