首页 > 解决方案 > 我的一些静态和动态图像链接在实时 vps ubuntu 服务器上被破坏,但在本地 xampp 服务器上工作

问题描述

我的一些静态和动态图像链接在 vps ubuntu 服务器上被破坏,但在本地 XAMPP 服务器上工作。当我尝试使用它们的 url 在新选项卡中打开图像时,它显示“404 not found Not Found。在此服务器上找不到请求的 URL。” 看来我的路径是正确的。请参阅下图以获取 .vps 服务器上文件管理器中的图像public_html

我试过清除缓存和cookies,在论坛和其他方法上使用了几种方法,但仍然不起作用。

索引.php

<section id="service">
        <div class="container">
            <h2>Our Products</h2>
            <br>
               <?php 
                    $select_query=mysqli_query($conn,"select *from products");
                   $row=mysqli_num_rows($select_query);
                ?>
            <div class="row">
             <?php if($row>0)
                {   
                    $sr=0;
                    while ($fetcharray=mysqli_fetch_array($select_query)) {
                    $sr+=1;
            ?>
                <div class="col-md-4 col-sm-6" >
                    <div class="service_item" >
                        <div class="service_photo" style="height:370px; width: 320px";>
                           <a href="description.php?pid=<?php echo base64_encode($fetcharray['id']);?>"><img src="<?php echo $fetcharray['picture'];?>" alt="Program"  style="height:370px; width: 320px"; /> </a>
                            <!--<div class="photo_overlay"></div>-->                        
                        </div>
                        <!--<div class="service_caption">
                            <h4><?php echo $fetcharray['name'];?></h4>
                            <p><?php echo $fetcharray['price'];?><br><?php echo $fetcharray['quantity'];?><br><?php echo $fetcharray['description'];?></p>
                        </div>-->
                    </div>
                </div>
                <?php }}?>

标签: phpxamppubuntu-18.04vps

解决方案


推荐阅读