WordPress at Your Fingertips
function is not described

PclZip::privWriteCentralHeader() public WP 1.0

Function : privWriteCentralHeader() Description : Parameters : Return Values :

{} It's a method of the class: PclZip{}

No Hooks.

Return

null. Nothing.

Usage

$PclZip = new PclZip();
$PclZip->privWriteCentralHeader( $p_nb_entries, $p_size, $p_offset, $p_comment );
$p_nb_entries (required)
-
$p_size (required)
-
$p_offset (required)
-
$p_comment (required)
-

Code of PclZip::privWriteCentralHeader() WP 5.8.2

function privWriteCentralHeader($p_nb_entries, $p_size, $p_offset, $p_comment)
{
  $v_result=1;

  // ----- Packed data
  $v_binary_data = pack("VvvvvVVv", 0x06054b50, 0, 0, $p_nb_entries,
	                      $p_nb_entries, $p_size,
						  $p_offset, strlen($p_comment));

  // ----- Write the 22 bytes of the header in the zip file
  fputs($this->zip_fd, $v_binary_data, 22);

  // ----- Write the variable fields
  if (strlen($p_comment) != 0)
  {
    fputs($this->zip_fd, $p_comment, strlen($p_comment));
  }

  // ----- Return
  return $v_result;
}