开发者

How to retrieve BLOB image from MySQL and write it to the rtf file using PHP?

I am trying to retrieve an Image file from DB(MySql) and writing it to the rtf File. Myquery is looks alike

select 
  FirstTable.name.FirsTable.age,
  ifnull(
    select 
      secondTable.object 
    from开发者_如何学C secondTable 
     where secondTable.Id=Firstable.Id
  ) As pic

When i execute the query everything is coming properly and i have written them to rtf.now the hurdle is with Image ,I am using Container.php 's addImage(string,margin) methode. at the time of inserting images to DB they all are encoded,i am also doing a base64_decode() with the image file.

In the rtf everytext is being written but at the place of image there is nothing even the size of rtf file doesn't increases,it means image is not being written there.

Any Help will be highly appreciable.Thanks in advance


Possibly your image is too big for mySQL. It has rather low limits for blob data.

So try put yours data into to gif/png/etc. before using rtf.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜