【问题标题】:Image download failing after server upgrade服务器升级后图片下载失败
【发布时间】:2016-01-02 22:43:47
【问题描述】:

我最近使用 apache 2.4.7 和 php 5.5.9 迁移到新的 ubuntu 服务器。 下面的代码在 ubuntu 上运行 apache 2.2.22 和 php 5.3.10 的旧服务器上运行良好。但不在新服务器上。

<?php 
    header("Content-Type:image/jpeg");
    echo './images/img1.jpg';   
?>

我不知道为什么会这样。是否有一些我需要更改/启用以使上述代码工作的 apache 配置?非常感谢任何帮助。

【问题讨论】:

    标签: php apache


    【解决方案1】:

    也许你有一些 .htaccess "Allow from" 指令? 它们在 2.4 中发生了变化,现在称为“Require ip xxx.xxx.xxx.xxx”。 见这里:http://httpd.apache.org/docs/trunk/new_features_2_4.html

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-01-11
      • 2015-01-13
      • 1970-01-01
      • 2019-11-11
      • 2017-10-28
      • 2017-05-21
      相关资源
      最近更新 更多