Description

This function prints a file to the browser.

Examples




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



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


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




cpapi1 --user=username Fileman fmpushfile public_html myfile.html



( '&' => '&&', '<' => '&<', '>' => '&>', '"' => '&"', "'" => '&'' )




Parameters

ParameterTypeDescriptionPossible valuesExample
dirstring

The file's directory.

This parameter defaults to the cPanel account's /home directory.

A valid directory name.public_html
filestring

Required

The file.

A valid file name.myfile.html

Returns

This function returns the file's contents with encoded, relevant HTML characters.