Inlcude Path to root folder of a user, impossible to set it properly.

lovelf

Registered
Feb 15, 2013
1
0
1
cPanel Access Level
Website Owner
Hello,

I am trying to set the include path to the root base of a user,

say my_user

using the following does not seem to work
Code:
set_include_path(':/usr/local/apache/htdocs/my_user/');
Don't know what to put in there,

the structure seen from winscp is:

root/home/my_user/public_html/

and I want public_html to be in the include path so I can work neatly with different platforms installed in the server by adding include as many times necessary in a good fashion way.

Also $_SERVER["DOCUMENT_ROOT"] becomes useless, it is not pointed to public_html/
it points to /usr/local/apache/htdocs/

trying to use
Code:
include($_SERVER["DOCUMENT_ROOT"]."/dir_a/dir_b/file.php");
Doesn't work as it is not in that directory /usr/local/apache/htdocs/

Thanks.
 
Last edited:

quietFinn

Well-Known Member
Feb 4, 2006
1,894
463
438
Finland
cPanel Access Level
Root Administrator