Skip to content

Tag: require

require footer and header each page but error 500

Hi, I start in PHP and I create my website. I create a component of header and footer to print on each page with : require ‘/assets/components/header.php’; and require ‘/assets/components/footer.php’; So, the problem is that on localhost, it works, but on website, it didn’t work …

Difference between “include” and “require” in php

Is there any difference between them? Is using them a matter of preference? Does using one over the other produce any advantages? Which is better for security? Answer You find the differences explained in the detailed PHP manual on the page of require: require is identical to include except upon failure it wi…