Found 34494 Articles for Programming

zip_entry_read() function in PHP

karthikeya Boyini
Updated on 27-Dec-2019 07:29:57

34 Views

The zip_entry_read() function is used to get the contents from an open zip archive file.Syntaxzip_entry_read(zip_entry, len)Parameterszip_entry − The zip entry resource. Required.len − The length in bytes. The default is 1024.ReturnThe zip_entry_read() function Returns the contents from an open zip archive file. Returns FALSE on failure.ExampleThe following is an example. Let’s say our zip file "one.zip" is having only a single file i.e. "detail.txt" with the following content.Asia is a continent!Let us see an example −ExampleOutputText in the file = Asia is a continent!Read More

zip_entry_open() function in PHP

Samual Sam
Updated on 26-Jun-2020 09:57:24

43 Views

The zip_entry_open() function is used to open a zip archive entry for reading.Syntaxzip_entry_open(zip_file,zip_entry,mode)Parameterszip_file − The zip file to be readzip_entry − The zip entry to open.mode − The type of access needed for zip archiveReturnThe zip_entry_open() function Returns TRUE on success, or FALSE on failure.Example

zip_entry_name() function in PHP

karthikeya Boyini
Updated on 26-Jun-2020 09:57:57

46 Views

The zip_entry_name() function returns the name of the zip archive file.Syntaxzip_entry_name(zip_entry)Parameterszip_entry − A zip file opened with zip_open() is to be mentioned here.ReturnThe zip_entry_name() function returns the name of the zip archive file.The following is an example. Let’s say we have 5 files in the zip archive "new.zip".ExampleOutputFile Name = amit.txt File Name = peter.txt File Name = result.html File Name = demo.java File Name = settings.ini

zip_entry_filesize() function in PHP

Samual Sam
Updated on 26-Jun-2020 10:01:55

48 Views

The zip_entry_filesize() function returns the file size before compression i.e. the actual file size is returned.Syntaxzip_entry_filesize(zip_entry)Parameterszip_entry − A zip file opened with zip_open() is to be mentioned here.ReturnThe zip_entry_filesize() function returns the file size before compression i.e. the actual file size is returned.Example

zip_entry_compressionmethod() function in PHP

karthikeya Boyini
Updated on 26-Jun-2020 10:02:29

32 Views

The zip_entry_compressionmethod() function returns the compression method of a zip archive entry.Syntaxzip_entry_compressionmethod()Parameterszip_entry − The zip entry resource. Required.ReturnThe zip_entry_compressionmethod() function returns the compression method of a zip archive entry.The following is an example. Let’s say we have 3 files in our zip archive "new.txt", therefore the compression method for all of these files will get displayed.ExampleOutputCompression Method = deflated Compression Method = deflated Compression Method = deflated

zip_entry_compressed_size() function in PHP

Samual Sam
Updated on 26-Jun-2020 09:52:24

43 Views

The zip_entry_compressed_size() function returns the compressed file size of a zip archive entry.Syntaxzip_entry_compressed_size(zip_entry)Parameterszip_entry − The zip entry resource. Required.ReturnThe zip_entry_compressed_size() function returns the compressed file size of a zip archive entry.The following is an example that gets the size of the files in "new.zip" archive.ExampleOutputCompressed: 90 Compressed: 12 Compressed: 67

zip_entry_close() function in PHP

karthikeya Boyini
Updated on 26-Jun-2020 09:52:55

32 Views

The zip_entry_close() function is used to close a zip archive opened by the zip_entry_open() function.Syntaxzip_entry_close(zip_entry)Parameterszip_entry − The zip entry resource. Required.ReturnThe zip_entry_close() function Returns TRUE on success and FALSE on failure.The following is an example. Let’s say we have "new.zip" file as our archive.Example

zip_close() function in PHP

Samual Sam
Updated on 26-Jun-2020 09:53:23

33 Views

The zip_close() function is used to close the zip file archive. The zip is opened by the zip_open() function.Syntaxzip_close(zip_file)Parameterszip_file − A zip file opened with zip_open() is to be mentioned here. This is the file we want to close.ReturnThe zip_close() function returns nothing.ExampleOutputFile will be closed now

sin() function in PHP

karthikeya Boyini
Updated on 27-Dec-2019 07:07:09

40 Views

The sin() function Returns the sine of a number.Syntaxsin(num)Parametersnum − The number for which you want to Return the sine. A value in radians.ReturnThe sin() function Returns the arc sine of a number.Example Live DemoOutput0.4794255386042-0.78332690962748ExampleLet us see another example − Live DemoOutput00.8414709848079-0.84147098480790.90929742682568

round() function in PHP

Samual Sam
Updated on 27-Dec-2019 07:05:22

161 Views

The round() function rounds a floating point number. For example, 0.90 to 1, 0.35 to 0, etc.Syntaxround(val, precision, mode)Parametersval − The value to roundprecision − It sets the precision i.e. the number of decimal digits to round tomode − A constant that specify the following rounding modePHP_ROUND_HALF_UP - The constant rounds val up to precision decimal, when it is half way there. Rounds 1.5 to 2 and -1.5 to -2. DefaultPHP_ROUND_HALF_DOWN - The constant rounds val down to precision decimal places, when it is half way there. Rounds 1.5 to 1 and -1.5 to -1PHP_ROUND_HALF_EVEN - It rounds val to ... Read More

Advertisements