Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/265.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
注意:第60行的E:\xampp\htdocs\index.php中未定义的index:name_Php_Html - Fatal编程技术网

注意:第60行的E:\xampp\htdocs\index.php中未定义的index:name

注意:第60行的E:\xampp\htdocs\index.php中未定义的index:name,php,html,Php,Html,我得到了这个错误 注意:第60行的E:\xampp\htdocs\index.php中未定义的index:name 这里的代码,我有,请帮助我摆脱这个错误。我不熟悉编码 <?php $root = ''; $path = 'images/'; $bhatti = array( '1'=>'Katrina wants to meet you', '2'=>'Kareena wants to meet you', '3'=>'Aishwarya wants to meet

我得到了这个错误 注意:第60行的E:\xampp\htdocs\index.php中未定义的index:name 这里的代码,我有,请帮助我摆脱这个错误。我不熟悉编码

<?php
$root = '';
$path = 'images/';

$bhatti = array(
'1'=>'Katrina wants to meet you',
'2'=>'Kareena wants to meet you',
'3'=>'Aishwarya wants to meet you',
'4'=>'Shahrukh wants to meet you',
'5'=>'Aamir wants to meet you',
'6'=>'Shahid kapoor wants to meet you',
'7'=>'Parineeti wants to meet you',
'9'=>'Priyanka wants to meet you',
'10'=>'She wants to meet you',
'11'=>'Kristen wants to meet you',
'12'=>'Shriya wants to meet you',
'13'=>'Sonakshi wants to meet you',
'14'=>'Deepika wants to meet you',
'15'=>'Cameron wants to meet you',
'16'=>'Ajay wants to meet you',
'17'=>'wants to meet you',
'c'=>' wants to meet you'
);
$img = $bhatti[array_rand($bhatti,1)];
?> 
<!DOCTYPE HTML>
<html>
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="keywords" content="diabetes, about diabetes,alcohol and diabetes,heart attack,Rheums" />
    <meta name="description" content="Click here to know the reason">
    <meta property="og:description" content="<?php echo $img; ?>"/>
    <meta property="og:type" content="article" />
    <meta property="og:title" content="<?php echo $img; ?>" />
    <meta property="og:image" content="http://<?php echo $_SERVER['SERVER_NAME']."/"; echo $path . rawurlencode($img); ?>.jpg" />
    <meta property="og:image:width" content="300" />
    <meta property="og:image:height" content="300" />
    <meta property="og:image:type" content="image/jpg" />

</head>
<body>

<?php if($_GET['name']){ ?>
<div><img src="<?php echo $path . $img ?>.jpg" alt="" /></div>
<?php }else{?>
<div><img src="oops.png" alt="" /></div>
<?php } ?>

<p>Developed by <a href="https://www.Facebook.com/Ali42726"> Ali Hasan </a>.</p>

<p>Thank you for visiting </p>

</body>
</html>

上有一个错误

<?php if($_GET['name']){ ?>

您需要检查是否在全局变量$\u GET中设置了名称

试用

<?php if(isset($_GET['name'])){ ?>

这一行的第一个。jpg“alt=”“/>您有一个错误。更正。jpg“alt=”“/>您错过了”;“第二,在这一行中,您从哪里获得“name”?