function _addString($p_filename, $p_string) {
if (!$this->_file) {
$this
->_error('Invalid file descriptor');
return false;
}
if ($p_filename == '') {
$this
->_error('Invalid file name');
return false;
}
// ----- Calculate the stored filename
$p_filename = $this
->_translateWinPath($p_filename, false);
if (!$this
->_writeHeaderBlock($p_filename, strlen($p_string), time(), 384, "", 0, 0)) {
return false;
}
$i = 0;
while (($v_buffer = substr($p_string, $i++ * 512, 512)) != '') {
$v_binary_data = pack("a512", $v_buffer);
$this
->_writeBlock($v_binary_data);
}
return true;
}