The PHP Function Set_Include_Path
In PHP, when you include a file in your script, the PHP interpreter looks for that file in a fixed set of directories called the include path. If the file is not found, an error will be generated. The php function set_include_path allows you to set this include path for the duration of your script. It can also be used to extend the current value of this option, using the PATH_SEPARATOR constant and adding multiple directories separated by a colon.
This article explains what the php function set_include_path does, how to use it, and provides examples.
In a Web server environment such as Apache, the php function set_include_path is commonly used to create an include path that will allow PHP to locate files and libraries. For example, if your web site uses the PEAR framework, you would want to ensure that PHP can find the libraries and other files that are part of this package.
Aside from setting the include path, you may also wish to set max_execution_time for your scripts, set memory limit, and enable display errors. In a cPanel account, you can modify these settings by editing an.htaccess file in your directory that is accessed via the cPanel File Manager or over SSH.
To protect your files from unauthorized access, you should create the include directory at the cPanel username level (one level above the web root, public_html) and only allow users in the cpanel_username group to view it. This will prevent anyone from accessing sensitive files in your public_html directory that could be used to exploit your cPanel account or your hosting environment.