img标签图片显示问题 求解

我的$step字符串是get方式传过来的

1.show.php图片描述

2.引入show.html文件,直接输出
图片描述

3.在firfox上显示正常,把图片链接单独访问是可以访问到图片的

图片描述

4.但是图片却无法在show.php文件访问时显示
图片描述

5.用调试工具显示是这样的
图片描述

求解答,对于状态码493,不明白是啥意思,求解

show.html

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
    <title></title>
</head>
<body>
    <div id="container">
        <div id="header">
            <span>菜名:</span><h1><?php echo $title;?></h1>
        </div>
        <div id="content">
            <span>标签:</span><?php echo $tags;?>
            <hr/>
            <span>推荐理由:</span><?php echo $intro;?>
            <hr/>
            <span>食材:</span><?php echo $ingredients;?>
            <hr/>
            <span>调料:</span><?php echo $burden;?>
            <hr/>
            <span>步骤:</span>
            <br/>
            <?php echo $str;?>
        </div>
        <div id="foot"></div>
        <div id='h50'></div>
        <div id="phone-nav">
            <ul>
                <li><a href="tel:18976977358"><i class="fa fa-2x fa-phone"></i>电话</a></li>
                <li><a href="sms:18976977358"><i class="fa fa-2x fa-edit"></i>短信</a></li>
                <li><a href="#"><i class="fa fa-2x fa-send"></i>分享</a></li>
                <li><a href="#"><i class="fa fa-2x fa-group"></i>关于</a></li>
            </ul>
        </div>
    </div>
</body>
</html>

show.php

//接收数据
    $title=$_GET['title'];
    $tags=$_GET['tags'];
    $intro=$_GET['intro'];
    $ingredients=$_GET['ingredients'];
    $burden=$_GET['burden'];
    $step=$_GET['step'];

    //将首尾“@”取出
    $step=trim($step,'@');
    //将字符串炸开,生成数组
    $step=explode('@',$step);
    //var_dump($step);exit;
    //循环遍历数组
    $str = "";
    for($i=0;$i<count($step);$i++){

        if($i%2==0){
            $one = (string)($step[$i]);
            $str.='<img width="100px" height="100px" src="'.$one.'" />';
        }else{
            $str.="<br/><p>{$step[$i]}</p><hr/>";
        }
    }

    //引入模板文件
    include 'show.html';
阅读 4.2k
2 个回答

你确定不是因为width="100px"还有height="100px"这种写法导致不显示的?

代码贴上来看下

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题