function read_file_content($FileName) { //open file $fp=fopen($FileName,"r"); $data=""; while(!feof($fp)) { //read the file $data.=fread($fp,4096); } //close the file fclose($fp); //delete the file //unlink($FileName); //return the content from the file echo $data; } read_file_content("a.html")