473,608 Members | 2,479 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1822
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*******@attgl obal.net
=============== ===
Jun 30 '08 #3
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
Jun 30 '08 #4
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
Jul 2 '08 #5

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

Similar topics

1
4223
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 it's full path too? or is it by the time php gets it it's on the server so it's too late to worry about it? do I have to get into javascript to get the path on the PC side??? I'm trying to check the filesize before having to upload the file to...
9
5401
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 ----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==---- http://www.newsfeeds.com The #1 Newsgroup Service in the World! >100,000 Newsgroups ---= East/West-Coast Server Farms - Total Privacy via Encryption =---
2
3184
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 direction of how I would go about doing that? I am thinking about storing the locations of them in the database and the physical files somewhere else. Not sure how to go about it though. Thanks.
10
2784
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 returns the filename...and just the filename. Which is what I want. In IE, however, this returns the ENTIRE local user's system path to the file
6
1906
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, but not too bad. But then I thought I wanted to try the other way, by putting the file location in SQL and storing the actual image in another directory. I plan to have many images on my web application, up to as many as 5000. Not to mention the...
10
4252
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. Because of this, I am unable to store these settings in the App.Config file, as this gets updated every time the application does, and there doesn't appear to be a way of preventing this. Most of my application settings are kept in the...
1
2364
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 == 'Submit') {
4
6899
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 function creates the file as expected. When I loop through my array I get the error - "ArgumentException was unhandled - Illegal characters in path" The value "C:\Temp.txt" is the first value in the array - as it works
0
230
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 os, sys def GetUserDataDirectory(): dir = None
0
8000
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8495
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8145
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8330
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5475
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4023
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2474
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1589
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1328
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.