简体   繁体   English

在php中上传文件的文件路径

[英]The file path of the file upload in php

In an html file, I have: 在一个html文件中,我有:

<form action="save.php" method="post" >
<input type="file" name="file" id="file`enter code here`" />
<input type="submit" name="submit"  value="Save" />

So I need the path of the uploaded file to the save.php page, please guide me. 因此,我需要上传文件的路径到save.php页面,请指导我。

The file won't be upload until you write PHP code in save.php file. 除非您在save.php文件中编写PHP代码, save.php该文件将不会上传。

You will get values of selected file in $_FILES after submitting form data. 提交表单数据后,您将在$_FILES获得所选文件的值。 Please use move_uploaded_file() PHP function to upload file. 请使用move_uploaded_file() PHP函数上传文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM