Archive_Tar::addString()
Описание
This method adds the string content in the archive like a file with full filename filename.
If the archive does not exists it attempts to create it.
Параметр
string $filename - the path and filename that will be associated with the added string in the archive.
string $content - the string to add in the archive as a file.
Throws
Таблица 40-1. Возможные значения PEAR_Error
Error code | Error message | Reason | Solution |
---|---|---|---|
NULL | "Unable to open in write mode file name" | The file permissions for an existing file do not allow writing or the file is locked. | Check permissions and possible competive programs using the file. |
NULL | "Unable to open file filenamein binary read mode" | The file to add to the archive could not be read. | Check for typing mistakes in the function argument and file permissions. |
Пример
Пример 40-1. Add a string in a compressed archive
|
Пред. | Начало | След. |
Archive_Tar::extractInString() | Уровень выше | File |