【发布时间】:2017-05-11 08:28:08
【问题描述】:
我正在为我的 WordPress 网站使用 google drive WP media WordPress 插件 但是这个插件一直在我的 nginx 服务器上给出这个错误,有人可以帮我修复这个代码
[错误] 4437#4437: *175114 FastCGI sent in stderr: "PHP message: PHP Notice: Undefined offset: 1 in /var/www/myhost/htdocs/wp-content/uploads/gdwpm_images/index.php 第 4 行 PHP 消息:PHP 通知:未定义的偏移量:第 4 行 /var/www/myhost/htdocs/wp-content/uploads/gdwpm_images/index.php 中的 1 PHP消息:PHP注意:未定义的偏移量:1 in /var/www/myhost/htdocs/wp-content/uploads/gdwpm_images/index.php on line 4"同时从上游读取响应标头,客户端:122.167.98.6,服务器: myhost,请求:“GET /wp-content/uploads/gdwpm_images/0B73eY08zeFxawYUhGOTA.jpg HTTP/1.1”,上游:“fastcgi://127.0.0.1:9070”,主机:“myhost”,引用者:“http:// ...这里是 gdwpm_image/index.php 代码
<?php
if (isset($_GET['imgid'])){
$gdwpm_ekst_gbr = explode('.', $_GET['imgid']);
if($gdwpm_ekst_gbr[1] == 'png' || $gdwpm_ekst_gbr[1] == 'gif' || $gdwpm_ekst_gbr[1] == 'bmp'){
header("Content-Type: image/" . $gdwpm_ekst_gbr[1]);
}else{
header("Content-Type: image/jpg");
}
$gdurl = "https://docs.google.com/uc?id=" . $gdwpm_ekst_gbr[0] . "&export=view";
@readfile($gdurl);
}
?>
我尝试修复代码,但没有任何更改。 有人可以帮忙解决吗? 谢谢!
【问题讨论】: