Knowledge base

1000 FAQs, 500 tutorials and instructional videos. Here, there are only solutions!

Change the include_path

This guide explains how to modify the value of the PHP directive include_path.

 

Modify the include_path

Like any other PHP parameter, include_path is defined in the .user.ini file.

Here is an example of a path to use in your .user.ini file:

include_path = ".:/home/clients/123456789a12345b12fc345d/web/www.domain.xyz/include"
  • The dot (.) at the beginning allows you to keep the current directory in the search.
  • The colon (:) is used as a separator between the different folders.

Refer to this other guide about phpinfo to verify that your new directive has been taken into account (the modification may take a few minutes to appear).

Although this method is still functional, using theautoloader of Composer is now the preferred solution for managing inclusions.


Has this FAQ been helpful?