Reading Files and Folders in existing folder using javascript or HTML | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Reading Files and Folders in existing folder using javascript or HTML

Hi Friends, I want to read image files from the folder where I have my html file. Is it possible using HTML or Javascript directly? Thanks, Suman

21st Jul 2018, 8:24 AM
Suman Gunda
4 Answers
+ 1
Yes In PHP it is possible Welcome to the Great World of PHP $filepath = "C:/WebFiles/myhtmlfile.html"; //Set File Path in Variable echo basename($filepath, '. html'); //Outputs myhtmlfile
21st Jul 2018, 8:38 AM
Femi
Femi - avatar
0
I am not sure what are all the images exist in that folder. Is it possible to read those file names?
21st Jul 2018, 8:33 AM
Suman Gunda
0
hi guys.. tq for your response.. i tried to read using activexobject .. it is running successful in IE browser of my lappy. but not in mobile.. is it possible to read from mobile also
23rd Jul 2018, 1:52 AM
Suman Gunda