In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
What are the considerations for uploading PHP files? in view of this problem, this article introduces the corresponding analysis and answers in detail, hoping to help more partners who want to solve this problem to find a more simple and easy way.
There are occasional problems in the actual implementation of PHP file upload. Below we sum up some skills and experience in solving the problem, which can be used as a reference object in the process of learning.
Assuming that the file field name in this interface is userfile, we can open a file selection window by browsing. After completing the selection, the text box will display the full path of the real file on the local machine. When upload is pressed, the file is transferred to the server's temporary directory and renamed to php?.tmp, where the question mark is a random number.
The html code for uploading PHP files is as follows:
< form action="upload.php" method="post" enctype="multipart/form-data" name="form1" > < input type="hidden" name="MAX_FILE_SIZE" value="30000"> < input name="userfile" type="file" > < input type="submit" name="Submit" value="上传"> < /form>After transferring to another file, upload.php, you can access the information related to that file through the following variables
$userfile_name upload document name
Temporary name to which the userfile_tmp_name uploaded document was saved
$userfile_size upload document size (in bytes)
$mime type of userfile_type uploaded document
The variables in these PHP file uploads are fine in windows+apache, but if you can't access them under linux, you can use the following variables
$_ FILE ['userfile'] [' name'] is equivalent to $userfile_name
$_ FILE ['userfile'] [' tmp_name'] is equivalent to $userfile_tmp_name
$_ FILE ['userfile'] [' size'] is equivalent to $userfile_size
$_ FILE ['userfile'] [type] is equivalent to $userfile_type
The answers to the questions about the upload of PHP files are shared here. I hope the above content can be of some help to you. If you still have a lot of doubts to be solved, you can follow the industry information channel to learn more about it.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.