开发者

File path grabber in php or Jquery

开发者 https://www.devze.com 2023-02-23 04:29 出处:网络
my requirement is this : \" When users uploaded one file say \"sample.tex\" then 开发者_Python百科i need to find the same name PDF file in that directory once he upload the \"sample.tex\". so file na

my requirement is this :

" When users uploaded one file say "sample.tex" then 开发者_Python百科i need to find the same name PDF file in that directory once he upload the "sample.tex". so file name should be "sample.pdf". we have one form that contain two input file fields.. check the image for reference.

http://img40.imageshack.us/i/proofbb.png/

once user upload the first file and click the "Show Author Email(s)" then i need to find another file "sample.pdf" in the same path and put in below file field. Is that possible in PHP or JQUERY or watever... not only PHP Even Java is also fine. Please help me to find the solution.

Regards Dipen


You cannot do that with plain JavaScript. You can't even obtain the path information from your "first file"; all the browser will tell you is the plain file name (that is, the file name without any path information). You also cannot force a "file" input field to be set to a value.

You might be able to do this by creating a signed Java applet, but that's a whole different enchilada and you'd pretty much have to make the whole form be a Java thing.

(There's nothing you can do from PHP, as all the server will get is the plain filename and no path information at all.)


Let the user do it. Use uploadify with multiple simultaneous uploads enabled. So simple.

0

精彩评论

暂无评论...
验证码 换一张
取 消