Connecting Tech Pros Worldwide Forums | Help | Site Map

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

ish
Guest
 
Posts: n/a
#1: Jun 30 '08
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
Guest
 
Posts: n/a
#2: Jun 30 '08

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


ish schrieb:
Quote:
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:
http://www.w3schools.com/PHP/php_file_upload.asp

Jerry Stuckle
Guest
 
Posts: n/a
#3: Jun 30 '08

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


ish wrote:
Quote:
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@attglobal.net
==================
burgermeister01@gmail.com
Guest
 
Posts: n/a
#4: Jun 30 '08

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


On Jun 30, 12:49*am, ish <ishpree...@gmail.comwrote:
Quote:
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
the_mighty_snap_dragon@hotmail.com
Guest
 
Posts: n/a
#5: Jul 2 '08

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


On Jun 30, 3:26*pm, "burgermeiste...@gmail.com"
<burgermeiste...@gmail.comwrote:
Quote:
On Jun 30, 12:49*am, ish <ishpree...@gmail.comwrote:
>
Quote:
hello everybody......
plz help me out...
>
Quote:
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
Closed Thread