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

前端 未结 8 717
小蘑菇
小蘑菇 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:54

    You need to change the settings of your browser and then you can access the relative path of your file.

    Chrome you will get real path using this.files[0].webkitRelativePath

    FirFox you will get using this.files[0].mozFullPath

提交回复
热议问题