Files and Directories

Recent Tutorial

PHP CSV File Export Using fputcsv()

October 24, 2014
In this tutorial, we are going to export MySQL records to a CSV File using PHP function fputcsv(). In the previous article, we have formatted the array of database results as CSV string. But by using fputcsv() function we need not format data to export it to a .csv file. View Demo PHP fputcsv() In […]
This tutorial was added to PHP.

PHP CSV File Export

October 23, 2014
In this tutorial, we are going to see how to export MySQL database records to a CSV file. Few days before we have seen about how to read from a CSV file. After connecting to the database, we have to fetch MySQL table records. These database results should be formatted as CSV string with proper […]
This tutorial was added to PHP.

PHP CSV File Read

April 4, 2014
This tutorial is to help you to read a CSV file or data. Character Separated Values(CSV) or Comma Separated Values is a file type containing plain text content with a comma or a character as separators. It is a convenient form to store simple data. PHP has two inbuilt functions to read CSV file. fgetcsv() […]
This tutorial was added to PHP.

PHP file_get_contents()

September 22, 2013
In PHP, file_get_contents() function is one of the file handling functions available in this scripting language. This function reads entire file source or part of it and returns as a PHP string data. This is most widely used function among other dedicated functions used for PHP file read. For example, file(), fread() and etc. PHP […]
This tutorial was added to PHP.

PHP Directory Functions

July 15, 2013
Some days before we have seen set of basic PHP file functions to perform file open, read, write or append operations. Similarly, PHP includes set of directory functions to deal with the operations, like, listing directory contents, and create/ open/ delete specified directory and etc. These basic functions are listed below. mkdir(): To make new […]
This tutorial was added to PHP.

PHP File Handling

May 13, 2013
Using PHP file handling mechanism, we can get external file resources to store as a reference. We have slightly touched about file resources while discussing PHP Resource Data. PHP provides set of in-built functions to handle files. Some of the functions are, fopen(), file_exists(), file_get_contents() and etc. Some of the basic operations to deal with […]
This tutorial was added to PHP.

Uploading Files using PHP

May 2, 2013
PHP provides built-in function move_uploaded_file() for uploading files to a directory. This function requires two parameters, those are the source file and the destination for the moved file. This function will check if the uploaded file is posted via HTTP POST method to protect the file data. The is_uploaded_file is used to check if the file is uploaded […]
This tutorial was added to PHP.

↑ Back to Top