Description
This function splits a URI-encoded path into individual parts.
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 |
Required The directory's path. |
The absolute path to the directory's location on the server. |
/home/user/public_html/new_directory |
Returns
Return |
Type |
Description |
Possible values |
Example |
dirparts |
hash |
An array of the cPanel account's directories and subdirectories. |
This hash contains thedirurl anddirpartreturns. |
|
dirurl |
string |
The subdirectory's path. The function returns this value in the dirpartshash. |
A valid directory path, relative to the user's home directory. |
/public_html/ |
dirpart |
string |
The subdirectory's name. The function returns this value in the dirpartshash. |
A valid directory name. |
public_html |
dir |
string |
The directory's path. |
The absolute path to the directory's location on the server. |
/home/user/public_html/subdomain.example.com |
reason |
string |
A reason for failure. Note: This function only returns a reasonvalue if there was an error. |
A string that describes the error. |
This is an error message. |
result |
Boolean |
Whether the function succeeded. |
|
1 |