得到500内部服务器错误?

ﱞﱞﱞ

这是造成问题的php代码

<?php
$link = $_SERVER['PHP_SELF'];
$link_array = explode('/',$link);
$last_part = end($link_array);
if($last_part == "funnyprank01.php"||$last_part == "funnyprank02.php"||$last_part == "funnyprank03.php"||$last_part == "funnyprank04.php")
{
<meta property="og:image"            content="http://i1.ytimg.com/vi/3uRpVGkVhVI/hqdefault.jpg">
<meta property="og:image:type"       content="image/jpg">
}
else
{
<meta property="og:image"            content="http://www.8mags.com/images/youtubeimage.png">
<meta property="og:image:type"       content="image/png">
}
?>

在添加此代码之前,一切工作正常。包含此代码的文件的名称为header.php

赞德战争
<?php
$link = $_SERVER['PHP_SELF'];
$link_array = explode('/',$link);
$last_part = end($link_array);
if($last_part == "funnyprank01.php"||$last_part == "funnyprank02.php"||$last_part ==     "funnyprank03.php"||$last_part == "funnyprank04.php")
{
?>
<meta property="og:image"            content="http://i1.ytimg.com/vi/3uRpVGkVhVI/hqdefault.jpg">
<meta property="og:image:type"       content="image/jpg">
<?php
}
else
{
?>
<meta property="og:image"            content="http://www.8mags.com/images/youtubeimage.png">
<meta property="og:image:type"       content="image/png">
<?php
}
?>

如果仍然返回500错误,请参阅我的原始答案

本文收集自互联网,转载请注明来源。

如有侵权,请联系[email protected] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章

来自分类Dev

CakePHP 500内部服务器错误

来自分类Dev

javascript 500内部服务器错误

来自分类Dev

500内部服务器错误Heroku

来自分类Dev

内部服务器500错误-Django

来自分类Dev

Ajax:500内部服务器错误

来自分类Dev

AJAX 500(内部服务器错误)

来自分类Dev

POST 500(内部服务器错误)

来自分类Dev

AJax内部服务器错误500

来自分类Dev

nginx 500内部服务器错误

来自分类Dev

AJAX 500(内部服务器错误)

来自分类Dev

unity 500内部服务器错误

来自分类Dev

Laravel 500内部服务器错误?

来自分类Dev

500内部服务器错误Heroku

来自分类Dev

htacces 500内部服务器错误

来自分类Dev

phpMyadmin 内部服务器错误 500

来自分类Dev

POST 500 内部服务器错误

来自分类Dev

500 内部服务器错误托管

来自分类Dev

内部服务器错误 (500)

来自分类Dev

Mod重写导致内部服务器错误,错误500

来自分类Dev

错误500-内部服务器错误-ADF

来自分类Dev

Laravel 5.2错误500(内部服务器错误)

来自分类Dev

收到错误 500 内部服务器错误

来自分类Dev

require_once导致500内部服务器错误

来自分类Dev

CURL给出500内部服务器错误

来自分类Dev

500内部服务器错误Ajax Laravel

来自分类Dev

imagecreatefromstring导致500内部服务器错误

来自分类Dev

HttpWebRequest接受500内部服务器错误

来自分类Dev

Ajax调用时内部服务器错误500

来自分类Dev

.htaccess / .htpasswd 500内部服务器错误