php - 我的一些静态和动态图像链接在实时 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 }}?>
解决方案
推荐阅读
- android - 设置 GitLab CI 时如何修复未知皮肤名称“WVGA800”错误?
- python - 从拉丁文和英文文本中提取日期、人物和地点
- javascript - 多行引导组按钮样式
- c# - 使用c#将灰度图像转换为rgb图像
- unity3d - 如何在 Unity 运行时制作 AssetBundle?
- debian - 为什么我的 debian/config 脚本在安装过程中没有被调用?
- python - Pandas 使用 apply 函数更新多个列
- solr - solr 在核心中加入多值字段查询
- android - JS:错误 javax.net.ssl.SSLHandshakeException:java.security.cert.CertPathValidatorException:找不到证书路径的信任锚
- sql - 如何仅选择那些在 TSQL 中具有不同字符串的行?