+ 1

Print files in html page using php

How to display files (text...) in html page accessing the files from a folder using glob() function?. the files won't show in the browser even using apache2 server iN linux OS

13th Jun 2020, 2:51 PM
Me&You
Me&You - avatar
3 Respostas
+ 3
what version of php you are using ?? glob () wont work on < 5.1 versions..
14th Jun 2020, 6:06 AM
Prashanth Kumar
Prashanth Kumar - avatar
+ 2
glob function will return an array try print_r (glob("*"));
14th Jun 2020, 4:02 AM
Prashanth Kumar
Prashanth Kumar - avatar
0
Hi Prashanth ... the problem is not with php code. It worked perfectly. But the files won't display in browser. this is the code $files = glob('music'/*.mp3'); Foreach ($files as $file) { Print_r($file); }
14th Jun 2020, 5:30 AM
Me&You
Me&You - avatar