使用PHP脚本在csv文件中插入图像 [英] Insert Image in csv file using php script

查看:398
本文介绍了使用PHP脚本在csv文件中插入图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


可能重复:

是基于文本的,它们没有任何图像或其他类型的二进制数据。



因此,除非生成器和读者都同意格式,例如 Data-URI 无法包含图形数据。



不同类型的文件,如电子表格(.odt,.xls / .xlsx),但这些不是您要求的CSV文件。


Possible Duplicate:
PHP code can insert image to excel file and open it correctly in MS Excel?

I want to add images in .csv file with the help of PHP script. I also don't know if it is possible or not.

解决方案

No, that is not possible straight away. By the specs, CSV files are text-based, they do not have anything like images or other type of binary data.

So unless both the generator and the reader agree on a format, such as a Data-URI, there is no way to include graphic data.

You might want to create a different kind of file, like a spreadsheet (.odt, .xls/.xlsx), however those are not CSV files you ask for.

这篇关于使用PHP脚本在csv文件中插入图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆