Home>Article>Backend Development> File and form operations and database operations involved in PHP file upload

File and form operations and database operations involved in PHP file upload

墨辰丷
墨辰丷 Original
2018-06-08 16:44:17 2431browse

This article mainly introduces the file and form operations and database operations involved in php file upload. Interested friends can refer to it. I hope it will be helpful to everyone.

The example of this article describes the method of uploading files and storing them into the database in PHP. The details are as follows:

The show_add.php file is as follows:

show_info.php file is as follows:

name; //$size=$row->size; $name = mysql_result($result,0,"file_name"); $size = mysql_result($result,0,"file_size"); mysql_close($conn); echo "
上传的文件的信息:"; echo "
The file's name - $name"; echo "
The file's size - $size"; echo "
附件"; ?>

submit.php file is as follows:

显示上传文件信息"; } else { echo "你没有上传任何文件"; } ?>

## The

#upload.php file is as follows:



  文件上传表单 
选择上传文件

Summary:The above is the entire content of this article, I hope it will be helpful to everyone's study.

Related recommendations:

php ajax real-time input automatic search matching method

Based on jQuery Implemented a rating function through PHP and mysql

Application of PHP variables, arrays, regular expressions and templates

The above is the detailed content of File and form operations and database operations involved in PHP file upload. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn