how to store the path of uploading file....

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • ish

    how to store the path of uploading file....

    hello everybody......
    plz help me out...

    how we can store the acual path of uploading file.i want to store the
    path of file in my database...bt i m not getting anyway to implement
    that......if i try to do it with the name="filename" ......i mean if
    echo filename it only print or gives the filename only...it does nt
    give path along the name....
    plzzzzz guys tell me a way to store the path....i need it for my
    project........ waiting 4 ur replies....
  • Olaf Schinkel

    #2
    Re: how to store the path of uploading file....

    ish schrieb:
    hello everybody......
    plz help me out...
    >
    how we can store the acual path of uploading file.i want to store the
    path of file in my database...bt i m not getting anyway to implement
    that......if i try to do it with the name="filename" ......i mean if
    echo filename it only print or gives the filename only...it does nt
    give path along the name....
    plzzzzz guys tell me a way to store the path....i need it for my
    project........ waiting 4 ur replies....
    Learn:
    W3Schools offers free online tutorials, references and exercises in all the major languages of the web. Covering popular subjects like HTML, CSS, JavaScript, Python, SQL, Java, and many, many more.


    Comment

    • Jerry Stuckle

      #3
      Re: how to store the path of uploading file....

      ish wrote:
      hello everybody......
      plz help me out...
      >
      how we can store the acual path of uploading file.i want to store the
      path of file in my database...bt i m not getting anyway to implement
      that......if i try to do it with the name="filename" ......i mean if
      echo filename it only print or gives the filename only...it does nt
      give path along the name....
      plzzzzz guys tell me a way to store the path....i need it for my
      project........ waiting 4 ur replies....
      You can't. HTTP upload doesn't send the path of the file. Doing such
      could be considered a huge security hole.

      But it should be immaterial to you, anyway. You can't go back to the
      user's system and fetch it again, for instance.

      --
      =============== ===
      Remove the "x" from my email address
      Jerry Stuckle
      JDS Computer Training Corp.
      jstucklex@attgl obal.net
      =============== ===

      Comment

      • burgermeister01@gmail.com

        #4
        Re: how to store the path of uploading file....

        On Jun 30, 12:49 am, ish <ishpree...@gma il.comwrote:
        hello everybody......
        plz help me out...
        >
        how we can store the acual path of uploading file.i want to store the
        path of file in my database...bt i m not getting anyway to implement
        that......if i try to do it with the name="filename" ......i mean if
        echo filename it only print or gives the filename only...it does nt
        give path along the name....
        plzzzzz guys tell me a way to store the path....i need it for my
        project........ waiting 4 ur replies....
        If it's the filepath on your server you're looking to learn about, use
        this:


        Comment

        • the_mighty_snap_dragon@hotmail.com

          #5
          Re: how to store the path of uploading file....

          On Jun 30, 3:26 pm, "burgermeiste.. .@gmail.com"
          <burgermeiste.. .@gmail.comwrot e:
          On Jun 30, 12:49 am, ish <ishpree...@gma il.comwrote:
          >
          hello everybody......
          plz help me out...
          >
          how we can store the acual path of uploading file.i want to store the
          path of file in my database...bt i m not getting anyway to implement
          that......if i try to do it with the name="filename" ......i mean if
          echo filename it only print or gives the filename only...it does nt
          give path along the name....
          plzzzzz guys tell me a way to store the path....i need it for my
          project........ waiting 4 ur replies....
          >
          If it's the filepath on your server you're looking to learn about, use
          this:
          >
          http://us2.php.net/manual/en/function.pathinfo.php
          I suggest you read the guides provided. But in short once the file is
          uploaded, its in the $_FILES['fileElement']['tmp_name'] part of the
          array (not the name like you might expect) and you need to move this
          file to a location on your server, so as you choose this, you dont
          need to "find out" where it is. It uploads to where ever the server
          has its temp directory set to in the php.ini, but like i say, you need
          to move the file out of there.

          Regards,
          John

          Comment

          Working...