473,383 Members | 1,963 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

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

ish
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....
Jun 30 '08 #1
4 1810
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:
http://www.w3schools.com/PHP/php_file_upload.asp

Jun 30 '08 #2
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.
js*******@attglobal.net
==================
Jun 30 '08 #3
On Jun 30, 12:49*am, ish <ishpree...@gmail.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
Jun 30 '08 #4
On Jun 30, 3:26*pm, "burgermeiste...@gmail.com"
<burgermeiste...@gmail.comwrote:
On Jun 30, 12:49*am, ish <ishpree...@gmail.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
Jul 2 '08 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Ralph Freshour | last post by:
I'm reading the php manual to find out how to get the path of a file I'm uploading from my PC - I'm using the $_FILES var but that is just the filename - is there a function that I can use to get...
9
by: Don | last post by:
How do I retrieve the full path (C:\.....filename) of a file uploaded to a php script on the server. I think $_FILES will only provide 'name', which is only the filename itself. Thanks, Don ...
2
by: Tim Zych | last post by:
How would I go about storing data files on my web host? I have an Access database driven website and I would like to save files and be able to download them. Can somebody point me in the right...
10
by: darrel | last post by:
I have an input type="file" field that I am using to accept a file upload. This works, but I'm having problems with the filename property. In firefox, this: MyInputField.postedfile.filename ...
6
by: Rudy | last post by:
Hello all! I am amazed how many posts I have read to store an image in SQL, and just as many against it. So I learned how to store an image in a SQL db and retrieve the image. A little tricky,...
10
by: Paul Cheetham | last post by:
Hi, I am developing an application that needs to store some machine-specific settings. The application is going to be published on the network in order to keep the clients on the latest version....
1
by: Glenn Coyle | last post by:
Hi I am having trouble writing the file path of a image to the database,also for some reason it is not uploading the images, anyone have any ideas? the code is below: if($_POST ==...
4
by: Vlad | last post by:
I am having problems using the file.create method within a function that is called when looping through an array of filepaths. If I call my function with a hardcoded file path --C:\Temp.txt the...
0
by: Brian Vanderburg II | last post by:
Lance Gamet wrote: Lance Gamet wrote: One way I've just started to use it to create a utility function to return the location of the user data folder, depending on the operating system: import...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.