Skip to content

Tag Archives: PHP-file-handling

There are a few different ways to extract the extension from a filename with PHP. They are: Using pathinfo(): The pathinfo() is a function that… Read More
Given the path of the folder and the task is to print names of subfolders and files present inside them. Explaination: In our PHP code,… Read More
At the time of PHP installation, php.ini is a special file provided as a default configuration file. It’s very essential configuration file which controls, what… Read More
The Filesystem function is used to access and manipulate filesystem. It is the part of PHP code so no need to install these functions. For… Read More
In PHP, files from a folder can be deleted using various approaches and inbuilt methods such as unlink, DirectoryIterator and DirectoryRecursiveIterator. Some of these approaches… Read More
In PHP, errors and warnings can be logged into a file by using a php script and changing configuration of php.ini file. Two such approaches… Read More
Given full path, find file name in the path. Input : path = /testweb/var/www/mywebsite/htdocs/home.php Output : home.php Input : path = /testweb/var/www/mywebsite/htdocs/abc.txt Output : abc.txt… Read More
The zip_entry_open() function is an inbuilt function in PHP which is used to open a zip entry archive for reading. Opening a file or a… Read More
The zip_entry_read() function is an inbuilt function in PHP which is used to read the contents from an opened zip archive entry. The zip entry… Read More
The zip_entry_name() function is an inbuilt function in PHP which is used to return the name of a zip archive entry. The zip entry resource… Read More
The zip_entry_filesize() function is an inbuilt function in PHP which is used to return the original file size of a zip archive entry before compression.… Read More
The zip_read() function is an inbuilt function in PHP which is used to read an entity present in the opened zip archive. The zip resource… Read More
The zip_open() function is an inbuilt function in PHP which is used to open a zip archive for reading. The zip_open() function creates a new… Read More
The zip_entry_compressionmethod() function is an inbuilt function in PHP which is used to return the compression method of a file or a directory from a… Read More
The zip_entry_compressedsize() function is an inbuilt function in PHP which is used to return the size of the compressed file in zip archive entry. It… Read More