Pregunta

When I try to include a file like this:

include ("../folder/file.php");

I get an error:

Warning: include(): open_basedir restriction in effect. File(../folder/file.php) is not within the allowed path(s)

But when I try to include the same file like this:

include ($_SERVER['DOCUMENT_ROOT']."/folder/file.php");

It works properly. I appreciate any thoughts to make it work using the first way :)

Regards, ExChill

¿Fue útil?

Solución

This should help ;) open_basedir settings in php.ini

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top