Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Dec 2008
    Thanked 0 Times in 0 Posts

    browse server from admin

    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

  • #2
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Saskatoon, Saskatchewan
    Thanked 2,662 Times in 2,631 Posts
    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 and 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.
    PHP Code:
    header('HTTP/1.1 420 Enhance Your Calm'); 
    Been gone for a few months, and haven't programmed in that long of a time. Meh, I'll wing it ;)


    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts