How to pass a file name from one page to another using php in linux?
-
hi! I m working in linux platform and using php .I want to pass the absolute file path browsed by the client from one page to another using php.I tried with the codes given below but i am not able to do so? the codes are: s.php: <?php session_start(); ?> <html> <body> <form name="fupload" enctype="multipart/form-data" action="s2.php" method="post"> <input type="file" name="picture" /> <input type="submit" value="Submit" /> </form> </body> </html> s2.php: <?php $nn =$_FILES['picture']; echo $nn; ?> o/p : Array. Now how can i display the full path name of the file entered by the client in the previous page in this page..plz help me to get rid f this problem..
-
Answer:
* picture - 'picture' is the reference we assigned in our HTML form. We will need this to tell the $_FILES array which file we want to play around with. * $_FILES['picture']['name'] - name contains the original path of the user uploaded file. * $_FILES['picture']['tmp_name'] - tmp_name contains the path to the temporary file that resides on the server. The file should exist on the server in a temporary directory with a temporary name. So, try using $_FILES['picture']['name'] or $_FILES['picture']['tmp_name']
sweta agarwal at Yahoo! Answers Visit the source
Related Q & A:
- How to upload a file to another server using cURL and PHP?Best solution by Stack Overflow
- How to cancel a file upload using an iframe?Best solution by Stack Overflow
- How to pass a parameter to a function that is called on an event?Best solution by Stack Overflow
- How can I transfer my music from one iPod to another?Best solution by Yahoo! Answers
- How to transfer Outlook Express emails from one laptop to another?Best solution by blog.chron.com
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.