By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,614 Members | 1,653 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,614 IT Pros & Developers. It's quick & easy.

problem with getting fullpath of the selected file from my computer

P: n/a
Dear All,

I am working on php with html form input type file.i want to get the
fullpath of my file which i have selected from my computer.

example :C:\programs\.....

can anyone help me,

Regards
Irfan

Mar 2 '07 #1
Share this Question
Share on Google+
3 Replies


P: n/a
<ir************@gmail.comwrote in message
news:11**********************@s48g2000cws.googlegr oups.com...
Dear All,

I am working on php with html form input type file.i want to get the
fullpath of my file which i have selected from my computer.

example :C:\programs\.....

can anyone help me,

Will this help?

$path = $_SERVER["SCRIPT_FILENAME"];
$path = substr($path, 0, strrpos($path, "/")+1);
Mar 2 '07 #2

P: n/a
On Mar 2, 5:30 pm, "McKirahan" <N...@McKirahan.comwrote:
<irfan.moham...@gmail.comwrote in message

news:11**********************@s48g2000cws.googlegr oups.com...
Dear All,
I am working on php with html form input type file.i want to get the
fullpath of my file which i have selected from my computer.
example :C:\programs\.....
can anyone help me,

Will this help?

$path = $_SERVER["SCRIPT_FILENAME"];
$path = substr($path, 0, strrpos($path, "/")+1);
Dear McKirahan,

i need the client side path,not the server.if i choose a file from
desktop it should give the path.

$_FILES only give the filename,i need the full path.

can you help me in this...

Thank you for your help,

Regards
Irfan

Mar 2 '07 #3

P: n/a
Rik
<ir************@gmail.comwrote:
<N...@McKirahan.comwrote:
><irfan.moham...@gmail.comwrote:
I am working on php with html form input type file.i want to get the
fullpath of my file which i have selected from my computer.
example :C:\programs\.....
i need the client side path,not the server.if i choose a file from
desktop it should give the path.

$_FILES only give the filename,i need the full path.

can you help me in this...
The browser doesn't send this, and rightly so, there is no way to
determine where the file came from when uploading using only HTML & PHP.

--
Rik Wasmus
Mar 2 '07 #4

This discussion thread is closed

Replies have been disabled for this discussion.