Level 25
Hi @daniel1836
If you say lib directory is one level up, have you tried with:
require_once '../lib/'.$class_name. '.php';
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I'm trying to run an OOP PHP app on my host site.
The error log says this
require_once(lib/Job.php): failed to open stream: No such file or directory in ...etc path...
So I think the issue is with this line in my init.php file
require_once 'lib/'.$class_name. '.php';
Could the issue be with my relative path? The lib directory is one level up.
Thanks
Please or to participate in this conversation.