将巨大的列表推送到 PHP 数组中
我在(.doc)文件中有一个巨大的商店名称列表,我想将这些名称存储在 mysql DB 中。通过循环将它们插入数据库.. 但我不知道如何将此列表推送到 php 数组中..
谢谢
I have a huge list of stores name in (.doc) file and I want to store these names in mysql DB The solution which I thought was to create an array of this list & by looping insert them in DB..
But I don’t know how to push this list in php array..
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
将 Word doc 保存为纯文本 (.txt) 文件。一次一行读取文件,然后插入数据库。
Save the word doc as a plain text (.txt) file. Read the file in a line at a time, and insert into the database.
如果您使用的是 Linux,则可以使用 WV。
否则,您可以使用 反词 或 AbiWord 拉出文本。
然后,您仍然需要将文本放入正确的
Array()
中,并且您可能会使用某种 REGEX 来执行此操作。If you are on linux you can use WV.
Else you can use antiword or AbiWord to pull the text out.
Then you'll still need to put the text into a proper
Array()
and you'll probably use some sort of REGEX to do that.