The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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

Discussion in 'General Discussion' started by lovelf, Feb 15, 2013.

  1. lovelf

    lovelf Registered

    Joined:
    Feb 15, 2013
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    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.
     
    #1 lovelf, Feb 15, 2013
    Last edited: Feb 15, 2013
  2. quietFinn

    quietFinn Well-Known Member

    Joined:
    Feb 4, 2006
    Messages:
    998
    Likes Received:
    10
    Trophy Points:
    18
    Location:
    Finland
    cPanel Access Level:
    Root Administrator
    Only if you are using a "temporary address", i.e. http://IPADDRESS/~my_user/
     
Loading...

Share This Page