As an example
define('ROOTUP', realpath(__DIR__ . '/../../nova40up') . DS);
include ROOTUP . 'dbconfig.php';
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hi, I'm new to Laravel. My project is based on version 5.4, but when I try to include an external php file that's not a blade view file, nothing works. The traditional <php include method is not accepted.
I've tried methods such as <?php include public_path() . and even app_path(), and those don't work. I'm confused. What am I doing wrong?
Dane
Please or to participate in this conversation.