[Solved] include(../template/header.html): failed to open stream: No such file or dir…

Introduce the problem of the path. It is recommended to join

include¬† $_SERVER[‘DOCUMENT_ROOT’].”/template/header.html”;

It means to get include.PHP. In the root of the website

        // Wrong
        // include('../template/header.html');
        // Right
        include $_SERVER['DOCUMENT_ROOT']."/template/header.html";

Similar Posts: