Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/69.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 使用jquery将文本文件导入mysql_Php_Jquery_Mysql_Ajax - Fatal编程技术网

Php 使用jquery将文本文件导入mysql

Php 使用jquery将文本文件导入mysql,php,jquery,mysql,ajax,Php,Jquery,Mysql,Ajax,我想使用php和jquery/Ajax将.txt文件值导入mysql,而无需页面刷新 使用以下格式 例如,文本文件是: user@emaill;user name;gender user1@emaill;user name;gender user2@emaill;user name;gender 用户选择文件并按下处理按钮。 一旦它开始处理 JQUERY/AJAX显示 you have 3 records processing

我想使用php和jquery/Ajax将.txt文件值导入mysql,而无需页面刷新

使用以下格式

例如,文本文件是:

       user@emaill;user name;gender
       user1@emaill;user name;gender
       user2@emaill;user name;gender
用户选择文件并按下处理按钮。 一旦它开始处理 JQUERY/AJAX显示

      you have 3 records
      processing Record no.1 user@email
      ..................................
      ..................................
      Import Process Complete
是否有人在同一个例子中工作

我在网上搜索,但没有找到任何例子。 许多图片上传示例,但不用于从文本文件导入数据


谢谢

忘了jQuery吧。我不认为这对这份工作有任何作用

只需写一篇文章将数据发送到PHP脚本。在这里,让PHP将其写入一个文件并执行
加载数据填充
()


或者,如果不想将数据复制到文件中,请使用
fgetcsv()
()解析行和字段,并生成SQL语句,以便将其存储在MySQL中。导入数据时,动画在其中不起任何重要作用。忘了让它看起来像科幻电影,只需确保它正确导入数据。没有用户在日常工作库中导入数据,通常只有在迁移系统或安装新系统,然后导入任何旧数据时才会这样做。这类任务通常由管理员完成,而不是普通用户。