Home > Backend Development > PHP Tutorial > 怎样下传一个csv文件更新数据库

怎样下传一个csv文件更新数据库

WBOY
Release: 2016-06-13 12:58:43
Original
1070 people have browsed it

怎样上传一个csv文件更新数据库?
怎样上传一个csv文件更新数据库?

<p>please select a scv file to upload</p><br />
<form action="index.php" method="post"><br />
	<input type="file" name="scv"  /><br />
	<input type="submit" value="submit" /><br />
</form><br />
<?php <br />
	mysql_connect('localhost','root','admin');<br />
	mysql_select_db('linjuming');<br />
	// how to upload a scv file and insert or update the "csv" table?<br />
	<br />
?>
Copy after login



------解决方案--------------------
去看看  phpexcel 这个插件
------解决方案--------------------
csv可以当txt读取,直接读取然后对应导入啊

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template