Including a PHP file in a child directory

Hello, quite a dumb question, but I’m having trouble requiring a file.

Just for reference, here is what my folder tree looks like:

|index.php
├── controllers
│   └── boost.php

Ive tried:

require __DIR__ . '../controllers/boost.php';
require __DIR__ . '/controllers/boost.php';
require 'controllers/boost.php';
require '/controllers/boost.php';

All of the above fail. Why is that?


off-topic sidenote: there’s no such thing as a dumb question

Bump

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.