Where would I start if I wanted to learn how to read file names from somewhere(my computer, for example), and write those names onto my webpage? I want to be able to iterate through one of my folders on my computer and print a list of the names of the files onto a webpage.
Thanks
Filling a webpage with file names
Page 1 of 13 Replies - 205 Views - Last Post: 25 December 2012 - 08:56 AM
Replies To: Filling a webpage with file names
#2
Re: Filling a webpage with file names
Posted 24 December 2012 - 04:15 PM
Typically you would need something on your machine... And php wouldn't be the best option. I would think an app that is on the machine that gathers up the info and writes to a web service and that service stores the info in a db table.
Though php does have directory iterator function.
http://php.net/manua...getfilename.php
Though php does have directory iterator function.
http://php.net/manua...getfilename.php
#3
Re: Filling a webpage with file names
Posted 25 December 2012 - 08:43 AM
For obvious security reasons, no browser will give your website access to the local file system. Neither would things like Flash or Java applets let you scan the local file system, for the same reason.
So, yea, like modi123_1 says, you'd have to run a program on your machine, which has access to your files, and use that to upload the results to your website.
So, yea, like modi123_1 says, you'd have to run a program on your machine, which has access to your files, and use that to upload the results to your website.
#4
Re: Filling a webpage with file names
Posted 25 December 2012 - 08:56 AM
I would use php to receive a file list from a program, but not the other way around. php can't launch on it's own without some sort of a scheduler.
I would write a program to create a csv or xml file, & then push it to a url, & then have php parse that file into a db. Then the webpage can create the file list from that db.
I would write a program to create a csv or xml file, & then push it to a url, & then have php parse that file into a db. Then the webpage can create the file list from that db.
Page 1 of 1
|
|

New Topic/Question
Reply



MultiQuote







|