dongtan8532 2015-11-19 03:36 采纳率: 0%
浏览 26

如何在php doc中调整图像大小的正确方法[关闭]

I'm trying to create a .doc file using php that has image inside it. The image inside it has a quite big weight and height, but i want to include it without creating a new small version image of it.

Here is my code

    set_time_limit (0);
    header("Content-type: application/");
    header("Content-Disposition: attachment;Filename=test.doc");    

        <meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
        <title>Hello World</title>
        <img src="http://localhost/test_zip/img/jesse_what.png" style="max-width:50; width:50;max-height:50; height:50;">

How is the correct way to resize it? because the style i place in the image tags is not working.

  • 写回答

2条回答 默认 最新

  • dongzhun8449 2015-11-19 04:11

    After a while of searching, i found a way to do it. So I add width and heigh attributes to the img tag

    now it looks like this

    <img src="http://localhost/test_zip/img/jesse_what.png" width="160" height="200">
    本回答被题主选为最佳回答 , 对您是否有帮助呢?



  • ¥15 需要数据库运行的图片
  • ¥15 如何获取vue-video-editor?
  • ¥100 vs2019 mfc程序如何实现64*64/48*48大小的真彩色工具栏
  • ¥15 全志v3s耳机音频输出口怎么外接功放
  • ¥15 华为ensp使用基本ACL限制公司网络访问
  • ¥15 帮我做下照片上的PLC题
  • ¥15 labview2022 使用modbus报缺少依赖?
  • ¥15 谷歌地图是不是不开通结算功能,api会使用不了哦
  • ¥15 unity腾讯云对象存储机型适配
  • ¥15 求全国交通咨询模拟代码,要求如下,可以完全在dev c++运行