Description

This function displays a file.


Examples




$cpanel = new CPANEL(); // Connect to cPanel - only do this once.
$view_file = $cpanel->api1('Fileman', 'viewfile', array('public_html', 'myfile')); // Call the function.



my $cpliveapi = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.
my $view_file = $cpliveapi->api1('Fileman', 'viewfile' ['public_html', 'myfile']); # Call the function.


<cpanel Module="Fileman::viewfile ( $FORM('dir','file'))">




cpapi1 --user=username Filename viewfile public_html myfile



<img src="images/gnome-textfile.gif"> <b><font size=+1>test.txt</font></b>
 <br>File Type: ASCII text




Parameters

ParameterTypeDescriptionPossible valuesExample
dirstring

Required

The file's directory.

Any valid directory name.user
filestring

Required

The file.

Any valid filenamemyfile

Returns

This function returns HTML that displays the file's properties.