Reading directory of hard drive

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • 3A Web Hosting

    Reading directory of hard drive

    Hi Folks

    This is probably starring me in the face but how do I read the contents
    of a hard drive directory? I've been playing around with the
    opendir($dir) sample from php.net and can read from the server without
    problem but how can I read a list of files from the hard drive of the PC
    (win98 (spit!)) I'm using? Basically what I want to do is read the file
    names of a certain directory on the hard drive into an array and then
    upload them all onto the server.

    --
    Colin

    3A Web Hosting Team

  • SeeSchloss

    #2
    Re: Reading directory of hard drive

    Le 02/01/2004, 3A Web Hosting a écrit dans le message
    <3FF4B3AD.F3342 01B@3awebhostin g.co.uk> :[color=blue]
    > Hi Folks
    >
    > This is probably starring me in the face but how do I read the
    > contents of a hard drive directory? I've been playing around with
    > the opendir($dir) sample from php.net and can read from the
    > server without problem but how can I read a list of files from
    > the hard drive of the PC (win98 (spit!)) I'm using? Basically
    > what I want to do is read the file names of a certain directory
    > on the hard drive into an array and then upload them all onto the
    > server.[/color]

    Hmm... you want to read the hard disk of the computer
    accessing the webpage ?

    --
    SeeSchloß

    Comment

    • 3A Web Hosting

      #3
      Re: Reading directory of hard drive

      Hi
      [color=blue]
      > Hmm... you want to read the hard disk of the computer
      > accessing the webpage ?[/color]

      Yes. If you had read my question you would know why! It's for the admin
      panel of a photo gallery I'm trying to write. All the photos go into a
      directory on your hard drive, you log into the control panel, tell it
      what directory to look in, it puts all the .jpg files into arrays and
      uploads them.

      --
      Colin

      3A Web Hosting Team

      Comment

      • SeeSchloss

        #4
        Re: Reading directory of hard drive

        Dans le message <3FF4B788.BE8BB 9C@3awebhosting .co.uk>,
        3A Web Hosting a écrit :[color=blue]
        > Hi
        >[color=green]
        >> Hmm... you want to read the hard disk of the computer
        >> accessing the webpage ?[/color]
        >
        > Yes. If you had read my question you would know why! It's for the
        > admin panel of a photo gallery I'm trying to write. All the
        > photos go into a directory on your hard drive, you log into the
        > control panel, tell it what directory to look in, it puts all the
        > .jpg files into arrays and uploads them.[/color]

        OK I read it but I thought I was not sure I had understood
        correctly. To my knowledge, unless you set up an ftp server
        or something like that on your computer, it won't be
        possible I think. Not just with PHP at least.

        --
        SeeSchloß

        Comment

        • Chung Leong

          #5
          Re: Reading directory of hard drive

          It's not doable.

          Uzytkownik "3A Web Hosting" <info@3awebhost ing.co.uk> napisal w wiadomosci
          news:3FF4B3AD.F 334201B@3awebho sting.co.uk...[color=blue]
          > Hi Folks
          >
          > This is probably starring me in the face but how do I read the contents
          > of a hard drive directory? I've been playing around with the
          > opendir($dir) sample from php.net and can read from the server without
          > problem but how can I read a list of files from the hard drive of the PC
          > (win98 (spit!)) I'm using? Basically what I want to do is read the file
          > names of a certain directory on the hard drive into an array and then
          > upload them all onto the server.
          >
          > --
          > Colin
          >
          > 3A Web Hosting Team
          > http://www.3awebhosting.co.uk[/color]


          Comment

          • Tim Van Wassenhove

            #6
            Re: Reading directory of hard drive

            On 2004-01-02, 3A Web Hosting <info@3awebhost ing.co.uk> wrote:[color=blue]
            > Hi
            >[color=green]
            >> Hmm... you want to read the hard disk of the computer
            >> accessing the webpage ?[/color]
            >
            > Yes. If you had read my question you would know why! It's for the admin
            > panel of a photo gallery I'm trying to write. All the photos go into a
            > directory on your hard drive, you log into the control panel, tell it
            > what directory to look in, it puts all the .jpg files into arrays and
            > uploads them.[/color]


            If you had read the manual, you would have known that PHP is
            server-side, and not client-side! Perhaps there is a nice JavaScript out
            there that will do what you want (Actually i hope there is no such
            thing, because that would allow evil admins to scan my harddisk
            contents)



            --
            verum ipsum factum

            Comment

            • Larry

              #7
              Re: Reading directory of hard drive

              Tim Van Wassenhove wrote:
              [color=blue]
              > If you had read the manual, you would have known that PHP is
              > server-side, and not client-side! Perhaps there is a nice JavaScript out
              > there that will do what you want (Actually i hope there is no such
              > thing, because that would allow evil admins to scan my harddisk
              > contents)[/color]

              Now that is a scary thought!

              --

              Comment

              • 3A Web Hosting

                #8
                Re: Reading directory of hard drive

                Hi Folks

                Well, now that's it's morning and the effects of the cider have worn off
                it's pretty obvious that PHP is server side and can't read the clients
                hard drive.

                I really should stop working earlier in the night!

                --
                Colin

                3A Web Hosting Team

                Comment

                • FLEB

                  #9
                  Re: Reading directory of hard drive

                  Regarding this well-known quote, often attributed to 3A Web Hosting's
                  famous "Thu, 01 Jan 2004 23:56:29 +0000" speech:
                  [color=blue]
                  > Hi Folks
                  >
                  > This is probably starring me in the face but how do I read the contents
                  > of a hard drive directory? I've been playing around with the
                  > opendir($dir) sample from php.net and can read from the server without
                  > problem but how can I read a list of files from the hard drive of the PC
                  > (win98 (spit!)) I'm using? Basically what I want to do is read the file
                  > names of a certain directory on the hard drive into an array and then
                  > upload them all onto the server.[/color]

                  You'd probably need some sort of signed-Java applet to do that.

                  --
                  -- Rudy Fleminger
                  -- sp@mmers.and.ev il.ones.will.bo w-down-to.us
                  (put "Hey!" in the Subject line for priority processing!)
                  -- http://www.pixelsaredead.com

                  Comment

                  • CountScubula

                    #10
                    Re: Reading directory of hard drive

                    "3A Web Hosting" <info@3awebhost ing.co.uk> wrote in message
                    news:3FF4B3AD.F 334201B@3awebho sting.co.uk...[color=blue]
                    > Hi Folks
                    >
                    > This is probably starring me in the face but how do I read the contents
                    > of a hard drive directory? I've been playing around with the
                    > opendir($dir) sample from php.net and can read from the server without
                    > problem but how can I read a list of files from the hard drive of the PC
                    > (win98 (spit!)) I'm using? Basically what I want to do is read the file
                    > names of a certain directory on the hard drive into an array and then
                    > upload them all onto the server.
                    >
                    > --
                    > Colin
                    >
                    > 3A Web Hosting Team
                    > http://www.3awebhosting.co.uk[/color]

                    You lost me, I stared at your question for a bit,

                    are you trying to look at a client side directory, so a client can
                    upload pics via a web interface?

                    if this is the case, write an applet, or an activex web componet

                    --
                    Mike Bradley
                    http://www.gzentools.com -- free online php tools


                    Comment

                    • CountScubula

                      #11
                      Re: Reading directory of hard drive

                      "3A Web Hosting" <info@3awebhost ing.co.uk> wrote in message
                      news:3FF4B788.B E8BB9C@3awebhos ting.co.uk...[color=blue]
                      > Hi
                      >[color=green]
                      > > Hmm... you want to read the hard disk of the computer
                      > > accessing the webpage ?[/color]
                      >
                      > Yes. If you had read my question you would know why! It's for the admin
                      > panel of a photo gallery I'm trying to write. All the photos go into a
                      > directory on your hard drive, you log into the control panel, tell it
                      > what directory to look in, it puts all the .jpg files into arrays and
                      > uploads them.
                      >
                      > --
                      > Colin
                      >
                      > 3A Web Hosting Team
                      > http://www.3awebhosting.co.uk[/color]

                      try this:




                      it requires that you enable unsigned activex objects,
                      (I am not going to spend the money to sign a test)

                      I think something along those lines are what you are looking for.

                      --
                      Mike Bradley
                      http://www.gzentools.com -- free online php tools


                      Comment

                      Working...