Description
This function prints the contents of a file to the web browser.
Warning:
- UAPI (recommended) —
Fileman::get_file_content
— This function retrieves a file's content. - cPanel API 2 — None.
Examples
Parameters
Parameter |
Type |
Description |
Possible values |
Example |
dir |
string |
The file's directory. This value defaults to the user's/home directory. |
Any valid directory, relative to the cPanel account's /home directory. |
public_html |
file |
string |
Required The file to display. |
Any valid file name. |
myfile.txt |
Returns
This function returns the file's contents.