Hello and welcome to our community! Is this your first visit?
Register
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
    Posts
    129
    Thanks
    0
    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
    Code:
    <input type="file" />
    but browsing the server

  • #2
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,987
    Thanks
    4
    Thanked 2,660 Times in 2,629 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'); 


  •  

    Posting Permissions

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