maito maito - 7 months ago 29
PHP Question

Require/include Error PHP

I have a strange error and I don't know what is going on. Here's the line of code:

require(__DIR__.'/../../modeles/newsletter/functions.php');


My folder looks like this:
this

And here's my
error:

I've tried a lot of combinations, but all failed...why?

Thanks

Answer

The error do not come from this line:

require(__DIR__.'/../../modeles/newsletter/functions.php');

it's come from the inclusion of the connexion_sql.php in your modeles/newsletter/functions.php file. Open your modeles/newsletter/functions.php and replace at line 2 :

require_once('/../../modeles/connexion_sql.php');

with

require_once('../modeles/connexion_sql.php');