So far I wrote a script so that I can browse for a file and see the printed name of the file. Here is the script:
<form action="upload.php" method="post" enctype="multipart/form- data">
Select:
<input type="file" name="fileToUpload" id="fileToUpload">
</form>
When I hit the browse button and choose a file, only the name of the file gets printed on my web page (My web-browser is Firefox and I am using a local server). Is there a way to print the whole address of the file? What I have found on the web so far were mostly suggesting ways when we know in advance "/path/to/file". But how can it be done if I randomly choose a file? If there is no way to do it with PHP because of security issues according to:
Is it possible t do it with C, C++, html, etc?
I really need to show the local path of the directory. What are the alternatives? The answer is it can't be done? I found this website http://www.htaccesstools.com/articles/full-path-to-file-using-php/
Don't know how it works though.
The other alternative would be to define a fixed path and let the user only choose that directory and since it is known I can print it out. Does it make sense?