Description

This function checks whether a directory contains a custom index page.

Examples 




$cpanel = new CPANEL(); // Connect to cPanel - only do this once.
$check_customindex = $cpanel->api1('Htaccess','getindex', array('directoryname','0') ); // Call the function.



my $cpliveapi = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.
my $check_customindex = $cpliveapi->api1('Htaccess','getindex', ['directoryname','0'] ); # Call the function.

 


<cpanel Module="Htaccess::getindex( $FORM('dir','indextype') )">




cpapi1 --user=username Htaccess getindex directoryname 0



checked




Parameters

ParameterTypeDescriptionPossible valuesExample

dir

string

Required

The directory name.

A valid directory name.directoryname
indextypeinteger

Required

The type of indexing.

  • 0 — No indexing.
  • 1 — Standard indexing.
  • 2 — Fancy indexing.
0

Returns

This function will display checked if the directory uses the specified index type.