且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何将excel文件插入mysql?

更新时间:2022-10-17 23:15:01

_FILES?


如何应用它?


thz。


使用SQL。 这里有教程 。 (或者使用你最喜欢的搜索引擎查找教程)


好的,我看过教程aldy,


但是我可以问一个问题是''mysqli''

如果我申请mysqli,它将面临问题

致命错误:调用未定义的函数:mysqli_connect( )在第9行的c:\ programHat \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\到mysql

问题会出来如


警告:mysql_real_escape_string()期望参数1为字符串,资源在第12行的c:\ program。\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\是字符串,资源在第13行的c:\program files \easyphp1-8 \ www \\\\ image \ add_file.php中给出

警告:mysql_real_escape_string()期望参数1为字符串,资源在第15行的c:\ program Files \easyphp1-8 \\\\ll\image\add_file.php中给出


警告:mysql_query():提供的参数不是c:\program files \easyphp1-8 \\\ll \ image中的有效MySQL-Link资源第21行\\ add_file.php

错误!无法插入文件



我可以要求解决方案吗?太赫兹


Can i ask how to insert a file into mysql?

what the different between basename, getElementsByTagName, DOMdocument and $_FILES?

how to apply it?

thz.

_FILES?

how to apply it?

thz.


use SQL. there?s a tutorial here. (or look for a tutorial using your favourite search engine)


ok, i hv seen the tutorial aldy,

but can i ask a question is ''mysqli''
if i apply mysqli, it will face the problem
Fatal error: Call to undefined function: mysqli_connect() in c:\program files\easyphp1-8\www\ll\image\add_file.php on line 9


if i change mysqli to mysql
the problem will come out such as

Warning: mysql_real_escape_string() expects parameter 1 to be string, resource given in c:\program files\easyphp1-8\www\ll\image\add_file.php on line 12

Warning: mysql_real_escape_string() expects parameter 1 to be string, resource given in c:\program files\easyphp1-8\www\ll\image\add_file.php on line 13

Warning: mysql_real_escape_string() expects parameter 1 to be string, resource given in c:\program files\easyphp1-8\www\ll\image\add_file.php on line 15

Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in c:\program files\easyphp1-8\www\ll\image\add_file.php on line 21
Error! Failed to insert the file

can i ask for the solution? thz