Description
This function returns an account's home directory's path in URI-encoded format.
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 |
dir |
string |
The directory for which to retrieve the file path. Note: Regardless of whether you use this parameter, the function will return the dir value. |
A valid directory on the server. |
public_html |
Returns
Return |
Type |
Description |
Possible values |
Example |
dir |
string |
The absolute path to the account's home directory. |
A valid path, in URI-encoded format. |
%2fhome%2fexample%2fpublic_html
|
reason |
string |
A reason for failure. Note: This function only returns a reason value if an error occurred. |
A string that describes the error. |
This is an error message. |
result |
Boolean |
Whether the function succeeded. |
|
1 |