Hi guys I want to create simple file system using php. I want to display content of uploaded file using php. But whene I upload html or php file then instead of showing its content, html or php code gets executed. I want to display that files without executing. Plz help me. Thank you.
Share
If PHP get’s executed you are including/requiring the file. Read it’s contents instead, e.g. with
file_get_contents()To prevent the browser from parsing the HTML use
htmlentities()Example: