php - Read in all the files in a particular directory displays the file names in a html list -
Reading all the files from a particular directory and displays the file name / link in an html list. My code: Thank you in advance
& lt; Ul & gt; & Lt ;? Php $ dir = '/ my_directory_location'; $ Files = scandor ($ dir); Forex Currency ($ files as $ INDILE) {? & Gt; & Lt; Li & gt; & Lt; A href = "& lt ;? php echo $ dir." / ". $ Ind_file ;? & gt;" & Gt; & Lt ;? Php echo $ ind_file ;? & Gt; & Lt; / Li & gt; & Lt ;? Php}? & Gt; & Lt; / Ul & gt;
& lt ;? Php foreach (globe ("* .pdf") as $ filename) {echo "$ filename
"; } Output:
resume1.pdf resume4.pdf resume5.pdf
Comments
Post a Comment