using `require` in my functions.php breaks the site

So, I have a snippet of code I’d like to tidy away in a directory that’s close to the root my wordpress directory. Specifially it lives in /includes/inc.

I’ve created a file called test.php and within it it simply says echo “XXXX”;

All I currenly want to be able to do is include this file in my functions.php file and see the sting printed to the screen.

The issue I’m seeing is that no matter what path I put into require, the page break. Even no path at all breaks the page. I’m 100% sure this is the correct path as well.

Why might this be happening?

Inside the functions.php file at the very top, below comments.


Inside the test.php file inside /inc within the theme folder:

 echo "TEST XXXXXX";

I’ve tried using
* require_once
* require
* include (just does nothing)
* include_once (same as include – does nothing)

Solutions Collecting From Web of "using `require` in my functions.php breaks the site"