Banner

Sponsor

Login


Welcome Back!
Guest
Guest

Register

Lost your password?

118 users online



Getting Full Path From File Input Box

Getting Full Path From File Input Box

Currently viewing this thread: 1 (0 members and 1 guests)


Page 1 out of 2
Benj

Benj

Web-deV
Status: Offline!

Getting Full Path From File Input Box

I have a file input box like this:

Code:

<input name="userfile" type="file" />


How would I get the full path of the file submited?

I've tried using "$_FILES['userfile']['name']" but it just contains the file name, and not the whole path.

Thanks.

___________________

// Ben

aonic

aonic

Neversidian
Status: Offline!
Quote:

Files will, by default be stored in the server's default temporary directory, unless another location has been given with the upload_tmp_dir directive in php.ini


--http://us3.php.net/manual/en/features.file-upload.php

which is why you move_uploaded_file file after upload.

___________________

-Developer
-Forum Leader
-NeverNET

Last edited by aonic, April 27th, 2005 07:59 PM (Edited 4 times)

Benj

Benj

Web-deV
Status: Offline!
Originally posted by aonic:
Quote:

Files will, by default be stored in the server's default temporary directory, unless another location has been given with the upload_tmp_dir directive in php.ini


--http://us3.php.net/manual/en/features.file-upload.php

which is why you move_uploaded_file file after upload.

Didn't help, I'm not uploading a file.

___________________

// Ben

Waldir

Waldir

God's Son
Status: Offline!

if you are not uplaoding it would hel to say what you are doing with it.

___________________

"The secret to creativity is knowing how to hide your sources." -- Albert Einstein

Benj

Benj

Web-deV
Status: Offline!

I just want to get the full file path from the box. Just to echo it, or something.

___________________

// Ben

radford

radford

Neverside Newbie
Status: Offline!
Originally posted by Benj:

I just want to get the full file path from the box. Just to echo it, or something.

For what?

___________________

Recommended: Ruby Rails SimpleTest Propel Lighttpd

BigToach

BigToach

Neversidian
Status: Offline!

just use a text field then.....

___________________

Neverside Development Director
PHP Snippets
BigToach.com - IT WORKS, TOACHY!

Phil

Phil

with Mr. Jones
Status: Offline!

The client-side path?

___________________

http://www.philbrodeur.com - Expert PHP Development and Tutorials

shufty

shufty

wibble bl00p
Status: Offline!

A file input box will have a browse button allowing the visitor to browse their hard drives, so i gather a client side path, and a text input box would not allow the visitor to browse their hard drives (not all users have have a path in the address bar of an explorer windows let alone able to copy and paste it).

The onchange function may well be able to assign the data in the input box to a hidden input field for the form submission.

kgx

kgx

Neverside Newbie
Status: Offline!

You can't find out the full path for security reasons. So sorry, it can't be done.

Page 1 out of 2
Quick Jump:

Main Navigation


Site & Graphic Design by Aeon Tan
Developed by Jeremie Pelletier & Scott Roach


NeverAPI generated this page in 0.0088 seconds.