public function read_file($path, $archive_filepath = FALSE)
	{
		if (file_exists($path) && FALSE !== ($data = file_get_contents($path)))
		{
			if (is_string($archive_filepath))
			{
				$name = str_replace('\\', '/', $archive_filepath);
			}
			else
			{
				$name = str_replace('\\', '/', $path);

				if ($archive_filepath === FALSE)
				{
					$name = preg_replace('|.*/(.+)|', '\\1', $name);
				}
			}

			$this->add_data($name, $data);
			return TRUE;
		}

		return FALSE;
	}
public function read_file($path, $archive_filepath = FALSE)
	{
		if (file_exists($path) && FALSE !== ($data = file_get_contents($path)))
		{
			if (is_string($archive_filepath))
			{
				$name = str_replace('\\', '/', $archive_filepath);
			}
			else
			{
				$name = str_replace('\\', '/', $path);

				if ($archive_filepath === FALSE)
				{
					$name = preg_replace('|.*/(.+)|', '\\1', $name);
				}
			}

			$this->add_data($name, $data);
			return TRUE;
		}

		return FALSE;
	}
public function read_file ( $ path , $ archive_filepath = FALSE ) { if ( file_exists ( $ path ) && FALSE !== ( $ data = file_get_contents ( $ path ) ) ) { if ( is_string ( $ archive_filepath ) ) { $ name = str_replace ( '\\' , '/' , $ archive_filepath ) ; } else { $ name = str_replace ( '\\' , '/' , $ path ) ; if ( $ archive_filepath === FALSE ) { $ name = preg_replace ( '|.*/(.+)|' , '\\1' , $ name ) ; } } $ this -> add_data ( $ name , $ data ) ; return TRUE ; } return FALSE ; }
Read the contents of a file and add it to the zip

@param	string	$path
@param	bool	$archive_filepath
@return	bool
Read the contents of a file and add it to the zip