Writing the full path of the file when it is browsed using php

前端 未结 8 721
小蘑菇
小蘑菇 2021-01-17 17:35

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:

 
8条回答
  •  悲&欢浪女
    2021-01-17 17:47

    Using JavaScript and a hidden field you can do this:

    $('#someHiddenField').val( $('#myFileField').val() );
    

    but keep in mind that not all browsers return the full path (specifically FF only returns the file name).

提交回复
热议问题