file_get_contents() lets reading a file and storing it in a string variable. Post navigation What should we do to be able to export data into an Excel file? How can we connect to a MySQL database from a PHP script?