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

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

WBOY
WBOYOriginal
2016-06-13 11:09:391030browse

怎样上传一个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 />?>



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

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