So I'm trying to make a theme from my Html file. And using require('file.php')
where file.php
is a series of different components of my theme. Now when I access the file directly, I still see the html. How do I make it display a blank page when user accesses the file.php
directly?
Explanation
So let's say I make index.php and I want to include the header file(header.php
)
When I require('header.php')
, everything works perfect. Now when I try to access the header.php
, I can see the html content of it. How to I make this appear blank instead of seeing the header.php
piece?
Thanks