Description
This function retrieves a domain's document root file paths.
Warning:
We strongly recommend that you use UAPI instead of cPanel API 2. However, no equivalent UAPI function exists.
Examples
Note:
Use cPanel's API Shell interface (Home >> Advanced >> API Shell) to directly test cPanel API calls.
Parameters
Parameter |
Type |
Description |
Possible values |
Example |
domain |
string |
The domain. This value defaults to the account's main domain. Note: The account must own this domain.
|
Any valid domain. |
example.com |
Returns
Return |
Type |
Description |
Possible values |
Example |
reldocroot |
string |
The document root's relative path. |
The document root's file path, relative to the user's home directory. |
public_html |
docroot |
string |
The document root's absolute path. |
An absolute file path. |
/home/user/public_html |
reason |
string |
A reason for failure. Note:
This function only returns a reason value if there was an error.
|
A string that describes the error. |
This is an error message. |
result |
boolean |
Whether the function succeeded.
|
|
1 |