View Full Version : browse server from admin

03-23-2010, 02:54 PM
please i need to know how to Browse server from my Admin page.
i made an admin page with username and password...

i want the administrator to browse the server to choose an uploaded file to be shown in the front end page

SO i need to know how to browse server and choose file from it like the tag

<input type="file" /> but browsing the server

03-23-2010, 03:17 PM
You cannot use the file input type to access a server resource unless you're physically on the server. Input works via client, not server side code.
To do what you're looking for, you can look into directory scanning functions such as glob (http://php.net/glob) and recursiveDirectoryIterator (http://php.net/class.recursivedirectoryiterator).
From this, you can list the filesystem structure of the server itself, and go from there. There will be no call to an input type to request a file.